diff options
Diffstat (limited to 'internal/web/server_test.go')
| -rw-r--r-- | internal/web/server_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/web/server_test.go b/internal/web/server_test.go index 284a454..12542e5 100644 --- a/internal/web/server_test.go +++ b/internal/web/server_test.go @@ -561,19 +561,19 @@ func TestSettingsPostInvalidBooks(t *testing.T) { post.Header.Set("Content-Type", "application/x-www-form-urlencoded") rec := httptest.NewRecorder() srv.ServeHTTP(rec, post) - if rec.Code != 200 || !strings.Contains(rec.Body.String(), "books.toml") { + if rec.Code != 200 || !strings.Contains(rec.Body.String(), "books.ini") { t.Errorf("invalid books should re-render with an error, got %d", rec.Code) } } -func bibleDefaultBooks() []byte { return bible.DefaultBooksTOML() } +func bibleDefaultBooks() []byte { return bible.DefaultBooksINI() } // TestSettingsPostEmptyBooksPreservesFile guards that a submit without a books -// field never clobbers an existing books.toml override. +// field never clobbers an existing books.ini override. func TestSettingsPostEmptyBooksPreservesFile(t *testing.T) { dir := t.TempDir() t.Setenv("LECTIO_CONFIG", filepath.Join(dir, "config.toml")) - booksPath := filepath.Join(dir, "books.toml") + booksPath := filepath.Join(dir, "books.ini") original := []byte("[en]\nJohn = [\"Jn\", \"John\"]\n") if err := os.WriteFile(booksPath, original, 0o644); err != nil { t.Fatal(err) @@ -594,7 +594,7 @@ func TestSettingsPostEmptyBooksPreservesFile(t *testing.T) { t.Fatalf("status %d", rec.Code) } if got, _ := os.ReadFile(booksPath); string(got) != string(original) { - t.Errorf("empty books submit clobbered books.toml: got %q", got) + t.Errorf("empty books submit clobbered books.ini: got %q", got) } } |
