Remove duplication from createfunction_test.go

Signed-off-by: Alex Young <alex@heuris.io>
This commit is contained in:
Alex Young
2017-09-19 23:03:26 +01:00
committed by Alex Ellis
parent 031a0bc18c
commit 403236610a

View File

@ -46,8 +46,9 @@ func TestCreate_ValidRequest(t *testing.T) {
t.Fail()
}
if code != http.StatusOK {
t.Errorf("Got HTTP code: %d, want %d\n", code, http.StatusOK)
expectedErrorCode := http.StatusOK
if code != expectedErrorCode {
t.Errorf("Got HTTP code: %d, want %d\n", code, expectedErrorCode)
return
}