client: test assertStatusCode

release-2.0
Brian Waldon 2014-10-30 11:46:44 -07:00
parent 549c643bfe
commit 052521eaf1
1 changed files with 10 additions and 0 deletions

View File

@ -83,3 +83,13 @@ func TestMembersAPIActionRemove(t *testing.T) {
t.Error(err.Error())
}
}
func TestAssertStatusCode(t *testing.T) {
if err := assertStatusCode(400, 404); err == nil {
t.Errorf("assertStatusCode failed to detect conflict in 400 vs 404")
}
if err := assertStatusCode(400, 400); err != nil {
t.Errorf("assertStatusCode found conflict in 400 vs 400: %v", err)
}
}