Skip to content

Commit

Permalink
Merge pull request #8 from alphagov/add-csv-preview-test-case
Browse files Browse the repository at this point in the history
Add test case for csv preview url
  • Loading branch information
theseanything authored Oct 19, 2023
2 parents c4fb794 + 2835dc3 commit 2a504ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ func TestGenerateFilePathTableDriven(t *testing.T) {
{"https://example.com/foo/", "text/html", "example.com/foo/index.html", nil},
{"https://example.com/foo/bar", "text/html", "example.com/foo/bar.html", nil},
{"https://example.com/foo", "text/csv", "example.com/foo.csv", nil},
{"https://example.com/foo.csv", "text/csv", "example.com/foo.csv", nil},
{"https://example.com/foo.csv/preview", "text/html", "example.com/foo.csv/preview.html", nil},
{"https://example.com/style.css", "text/css", "example.com/style.css", nil},
{"https://example.com/foo", "text/blah", "", errors.New("Error determining content type")},
{"https://example.com/foo", "", "", errors.New("Error determining content type")},
Expand Down

0 comments on commit 2a504ac

Please sign in to comment.