diff options
| author | Horus_Arch | 2015-02-26 02:40:52 +0100 |
|---|---|---|
| committer | Horus_Arch | 2015-02-26 02:40:52 +0100 |
| commit | 64ae2edb5a97f05f5592f58422adbc6ac089f9e8 (patch) | |
| tree | b375a73ec6bd0698d27cd01ef4307e62e9c1fa6d /app/handler_test.go | |
| parent | 49ffcba2c3c4a19d147dd792d7f6c99b7545a491 (diff) | |
| download | statuspage-64ae2edb5a97f05f5592f58422adbc6ac089f9e8.tar.gz | |
Clean up. More backend code. Better UX and design.
Diffstat (limited to 'app/handler_test.go')
| -rw-r--r-- | app/handler_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/handler_test.go b/app/handler_test.go index 67692b0..53d8775 100644 --- a/app/handler_test.go +++ b/app/handler_test.go @@ -33,3 +33,18 @@ func BenchmarkIndexHandler(b *testing.B) { IndexHandler(response, request) } } + +func TestAdminHandler(t *testing.T) { + request, err := http.NewRequest("GET", "/admin", nil) + if err != nil { + t.Log("Error creating new http request. ", err) + } + response := httptest.NewRecorder() + + AdminHandler(response, request) + + if response.Code != 302 { + t.Log(response.Code) + t.Fatal("Expected 403 as status code.") + } +} |
