mirror of
https://github.com/openfaas/faas.git
synced 2025-06-20 13:06:40 +00:00
Remove duplication from createfunction_test.go
Signed-off-by: Alex Young <alex@heuris.io>
This commit is contained in:
@ -46,8 +46,9 @@ func TestCreate_ValidRequest(t *testing.T) {
|
|||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
if code != http.StatusOK {
|
expectedErrorCode := http.StatusOK
|
||||||
t.Errorf("Got HTTP code: %d, want %d\n", code, http.StatusOK)
|
if code != expectedErrorCode {
|
||||||
|
t.Errorf("Got HTTP code: %d, want %d\n", code, expectedErrorCode)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user