mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Add option to change the number of entries per page (fixes #40)
This commit is contained in:
parent
e32fa059e5
commit
5f266319a3
35 changed files with 174 additions and 52 deletions
|
@ -13,6 +13,7 @@ func TestValid(t *testing.T) {
|
|||
Language: "en_US",
|
||||
Timezone: "UTC",
|
||||
EntryDirection: "asc",
|
||||
EntriesPerPage: 50,
|
||||
}
|
||||
|
||||
err := settings.Validate()
|
||||
|
@ -30,6 +31,7 @@ func TestConfirmationEmpty(t *testing.T) {
|
|||
Language: "en_US",
|
||||
Timezone: "UTC",
|
||||
EntryDirection: "asc",
|
||||
EntriesPerPage: 50,
|
||||
}
|
||||
|
||||
err := settings.Validate()
|
||||
|
@ -51,6 +53,25 @@ func TestConfirmationIncorrect(t *testing.T) {
|
|||
Language: "en_US",
|
||||
Timezone: "UTC",
|
||||
EntryDirection: "asc",
|
||||
EntriesPerPage: 50,
|
||||
}
|
||||
|
||||
err := settings.Validate()
|
||||
if err == nil {
|
||||
t.Error("Validate should return an error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestEntriesPerPageNotValid(t *testing.T) {
|
||||
settings := &SettingsForm{
|
||||
Username: "user",
|
||||
Password: "hunter2",
|
||||
Confirmation: "hunter2",
|
||||
Theme: "default",
|
||||
Language: "en_US",
|
||||
Timezone: "UTC",
|
||||
EntryDirection: "asc",
|
||||
EntriesPerPage: 0,
|
||||
}
|
||||
|
||||
err := settings.Validate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue