Skip to content

Commit

Permalink
Test was breaking because the granularity of the sort is 1d, and the
Browse files Browse the repository at this point in the history
staging data was less than that.
  • Loading branch information
gwynforthewyn committed Jun 30, 2024
1 parent d50d3c1 commit bec4826
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions andrew_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,6 @@ func TestArticlesOrderInAndrewTableOfContentsIsOverridable(t *testing.T) {

contentRoot := t.TempDir()

// fstest.MapFS does not enforce file permissions, so we need a real file system in this test.
// above might be wrong
err := os.WriteFile(contentRoot+"/index.html", []byte("{{.AndrewTableOfContents}}"), 0o700)
if err != nil {
t.Fatal(err)
Expand All @@ -506,9 +504,7 @@ func TestArticlesOrderInAndrewTableOfContentsIsOverridable(t *testing.T) {
now := time.Now()

newest := now.Add(24 * time.Hour)
formattedDate := newest.Format("2006-01-02")

content := fmt.Sprintf(`<meta name="andrew-publish-time" content="%s">`, formattedDate)
content := fmt.Sprintf(`<meta name="andrew-publish-time" content="%s">`, newest.Format("2006-01-02"))

err = os.WriteFile(contentRoot+"/b_newest.html", []byte(content), 0o700)
if err != nil {
Expand Down

0 comments on commit bec4826

Please sign in to comment.