@@ -154,27 +154,27 @@ func TestErisedShutdownRoute(t *testing.T) {
154154 })
155155}
156156
157- func TestErisedWebPageRoute (t * testing.T ) {
157+ func TestErisedEchoServerRoute (t * testing.T ) {
158158 zerolog .SetGlobalLevel (zerolog .Disabled )
159159 g := goblin .Goblin (t )
160160 RegisterFailHandler (func (m string , _ ... int ) { g .Fail (m ) })
161161 svr := server {}
162162
163- g .Describe ("Test erised/webpage " , func () {
164- g .It ("Should return StatusOK" , func () {
163+ g .Describe ("Test erised/echoserver " , func () {
164+ g .It ("Should return non-empty body and StatusOK" , func () {
165165 res := httptest .NewRecorder ()
166- req := httptest .NewRequest (http .MethodGet , "http://localhost:8080/erised/webpage " , nil )
167- svr .handleWebPage ().ServeHTTP (res , req )
166+ req := httptest .NewRequest (http .MethodGet , "http://localhost:8080/erised/echoserver " , nil )
167+ svr .handleEchoServer ().ServeHTTP (res , req )
168168
169169 Ω (res .Code ).Should (Equal (http .StatusOK ))
170170 Ω (res .Body .String ()).ShouldNot (BeEmpty ())
171171 Ω (res .Header ().Get ("Content-Type" )).Should (Equal ("text/html" ))
172172 })
173173
174- g .It ("Should also return StatusOK" , func () {
174+ g .It ("Should also return non-empty body and StatusOK" , func () {
175175 res := httptest .NewRecorder ()
176- req := httptest .NewRequest (http .MethodPost , "http://localhost:8080/erised/webpage /any/path" , nil )
177- svr .handleWebPage ().ServeHTTP (res , req )
176+ req := httptest .NewRequest (http .MethodPost , "http://localhost:8080/erised/echoserver /any/path" , nil )
177+ svr .handleEchoServer ().ServeHTTP (res , req )
178178
179179 Ω (res .Code ).Should (Equal (http .StatusOK ))
180180 Ω (res .Body .String ()).ShouldNot (BeEmpty ())
0 commit comments