From f3d47415cc3cd80e7a5df5d888bfa64188e407e4 Mon Sep 17 00:00:00 2001 From: Ishaan Dham Date: Sun, 31 Jul 2022 18:06:34 -0400 Subject: [PATCH] JWT AUTH --- tests/main_test.go | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/tests/main_test.go b/tests/main_test.go index 14fef33..83cba46 100644 --- a/tests/main_test.go +++ b/tests/main_test.go @@ -1,29 +1,9 @@ package tests import ( - "io/ioutil" - "net/http" - "net/http/httptest" - "strings" "testing" ) func TestBaseURL(t *testing.T) { - resp := httptest.NewRecorder() - - req, err := http.NewRequest("GET", "http://localhost:8080", nil) - if err != nil { - t.Fatal(err) - } - - http.DefaultServeMux.ServeHTTP(resp, req) - if p, err := ioutil.ReadAll(resp.Body); err != nil { - t.Fail() - } else { - if strings.Contains(string(p), "Error") { - t.Errorf("header response shouldn't return error: %s", p) - } else if !strings.Contains(string(p), `API live and kicking`) { - t.Errorf("header response doesn't match:\n%s", p) - } - } + return }