mirror of https://github.com/docker/docs.git
add assert to make sure a failed typed stack pop doesn't remove the item from the stack
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
parent
9307692b52
commit
638b06b36a
|
|
@ -50,6 +50,7 @@ func TestPopStringWrongType(t *testing.T) {
|
|||
_, err := s.PopString()
|
||||
assert.Error(t, err)
|
||||
assert.IsType(t, ErrBadTypeCast{}, err)
|
||||
assert.Len(t, s.s, 1)
|
||||
}
|
||||
|
||||
func TestPopStringEmpty(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue