Fix error handling in renderStatic

Fixes #60
This commit is contained in:
Daan Sprenkels
2020-05-30 17:53:46 +02:00
parent 0b2297a2e8
commit d37222f82a
3 changed files with 21 additions and 11 deletions

View File

@@ -57,7 +57,7 @@ func createTemporaryRouter(t *testing.T) (*mux.Router, *rushlink) {
fs: fileStore,
rootURL: rootURL,
}
return CreateMainRouter(&rl, true), &rl
return CreateMainRouter(&rl), &rl
}
// checkStatusCode checks whether the status code from a recorded response is equal
@@ -150,7 +150,7 @@ func TestIssue53(t *testing.T) {
func TestIssue60(t *testing.T) {
srv, _ := createTemporaryRouter(t)
// Put a URL with a fragment identifier into the database.
// Request a nonexistent static file
req, err := http.NewRequest("GET", "/css/nonexistent_file.css", nil)
if err != nil {
t.Fatal(err)