diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-05 17:44:39 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-05 17:44:39 +0300 |
commit | a8942247992d272ae29074d362a2c6b7de6bf96b (patch) | |
tree | da283ce60549d0cba61a95a8e37fc226489962ea /domain_test.go | |
parent | 525b9a33476e97f5a2a006cb4e4ff7959722d467 (diff) |
Fix predefined 404 Content-Type
Diffstat (limited to 'domain_test.go')
-rw-r--r-- | domain_test.go | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/domain_test.go b/domain_test.go index 56e032a4..9032aeee 100644 --- a/domain_test.go +++ b/domain_test.go @@ -2,12 +2,12 @@ package main import ( "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "mime" "net/http" + "net/http/httptest" "net/url" "testing" - "net/http/httptest" - "github.com/stretchr/testify/require" - "mime" ) func TestGroupServeHTTP(t *testing.T) { @@ -95,6 +95,16 @@ func TestDomain404ServeHTTP(t *testing.T) { testHTTP404(t, testDomain.ServeHTTP, "GET", "http://group.404.test.io/", nil, "Custom 404 group page") } +func TestPredefined404ServeHTTP(t *testing.T) { + setUpTests() + + testDomain := &domain{ + Group: "group", + } + + testHTTP404(t, testDomain.ServeHTTP, "GET", "http://group.test.io/not-existing-file", nil, "The page you're looking for could not be found") +} + func TestGroupCertificate(t *testing.T) { testGroup := &domain{ Group: "group", |