1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Make reading speed user-configurable

This commit is contained in:
Gabriel Augendre 2021-08-30 16:53:05 +02:00 committed by Frédéric Guillot
parent 3a0aaddafd
commit 6e50ce3293
31 changed files with 395 additions and 173 deletions

View file

@ -6,15 +6,17 @@ import (
func TestValid(t *testing.T) {
settings := &SettingsForm{
Username: "user",
Password: "hunter2",
Confirmation: "hunter2",
Theme: "default",
Language: "en_US",
Timezone: "UTC",
EntryDirection: "asc",
EntriesPerPage: 50,
DisplayMode: "standalone",
Username: "user",
Password: "hunter2",
Confirmation: "hunter2",
Theme: "default",
Language: "en_US",
Timezone: "UTC",
EntryDirection: "asc",
EntriesPerPage: 50,
DisplayMode: "standalone",
DefaultReadingSpeed: 35,
CJKReadingSpeed: 25,
}
err := settings.Validate()
@ -25,15 +27,17 @@ func TestValid(t *testing.T) {
func TestConfirmationEmpty(t *testing.T) {
settings := &SettingsForm{
Username: "user",
Password: "hunter2",
Confirmation: "",
Theme: "default",
Language: "en_US",
Timezone: "UTC",
EntryDirection: "asc",
EntriesPerPage: 50,
DisplayMode: "standalone",
Username: "user",
Password: "hunter2",
Confirmation: "",
Theme: "default",
Language: "en_US",
Timezone: "UTC",
EntryDirection: "asc",
EntriesPerPage: 50,
DisplayMode: "standalone",
DefaultReadingSpeed: 35,
CJKReadingSpeed: 25,
}
err := settings.Validate()
@ -48,15 +52,17 @@ func TestConfirmationEmpty(t *testing.T) {
func TestConfirmationIncorrect(t *testing.T) {
settings := &SettingsForm{
Username: "user",
Password: "hunter2",
Confirmation: "unter2",
Theme: "default",
Language: "en_US",
Timezone: "UTC",
EntryDirection: "asc",
EntriesPerPage: 50,
DisplayMode: "standalone",
Username: "user",
Password: "hunter2",
Confirmation: "unter2",
Theme: "default",
Language: "en_US",
Timezone: "UTC",
EntryDirection: "asc",
EntriesPerPage: 50,
DisplayMode: "standalone",
DefaultReadingSpeed: 35,
CJKReadingSpeed: 25,
}
err := settings.Validate()