From c4f4d1e578e3daedfbfe3daa1c462f55e04cd21e Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Sun, 2 Feb 2020 18:41:36 +0100 Subject: [PATCH] Test: Add test for api/geo --- internal/api/geo_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 internal/api/geo_test.go diff --git a/internal/api/geo_test.go b/internal/api/geo_test.go new file mode 100644 index 000000000..09f171a9f --- /dev/null +++ b/internal/api/geo_test.go @@ -0,0 +1,19 @@ +package api + +import ( + "net/http" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGetGeo(t *testing.T) { + t.Run("get geo", func(t *testing.T) { + app, router, conf := NewApiTest() + + GetGeo(router, conf) + + result := PerformRequest(app, "GET", "/api/v1/geo") + assert.Equal(t, http.StatusOK, result.Code) + }) +}