Skip to content

Commit 7ea3472

Browse files
committed
Fix test
1 parent bca53f0 commit 7ea3472

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/erised/serverRoutes_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ func TestErisedShutdownRoute(t *testing.T) {
146146
g.Describe("Test erised/shutdown", func() {
147147
g.It("Should return MethodNotAllowed", func() {
148148
res := httptest.NewRecorder()
149-
req := httptest.NewRequest(http.MethodPost, "http://localhost:8080/erised/shutdown", nil)
150-
svr.handleHeaders().ServeHTTP(res, req)
149+
req := httptest.NewRequest(http.MethodGet, "http://localhost:8080/erised/shutdown", nil)
150+
svr.handleShutdown().ServeHTTP(res, req)
151151

152152
Ω(res.Code).Should(Equal(http.StatusMethodNotAllowed))
153153
})
@@ -253,7 +253,7 @@ func TestErisedLandingRoute(t *testing.T) {
253253
})
254254

255255
g.It("Should return serverRoutes_test.json file content in body", func() {
256-
exp := `{"Name":"serverRoutes_test"}`
256+
exp := `{"Name":"serverRoutes_test"}` + "\n"
257257
res := httptest.NewRecorder()
258258
req := httptest.NewRequest(http.MethodGet, "http://localhost:8080/", nil)
259259
req.Header.Set("X-Erised-Content-Type", "json")

cmd/erised/serverRoutes_test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"Name":"serverRoutes_test"}
1+
{"Name":"serverRoutes_test"}

0 commit comments

Comments
 (0)