From 403236610ab91dc5a7d6b797a2928ae2cc541249 Mon Sep 17 00:00:00 2001 From: Alex Young Date: Tue, 19 Sep 2017 23:03:26 +0100 Subject: [PATCH] Remove duplication from createfunction_test.go Signed-off-by: Alex Young --- gateway/tests/integration/createfunction_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gateway/tests/integration/createfunction_test.go b/gateway/tests/integration/createfunction_test.go index 8e1999ae..b18db406 100644 --- a/gateway/tests/integration/createfunction_test.go +++ b/gateway/tests/integration/createfunction_test.go @@ -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 }