mirror of
https://github.com/miniflux/v2.git
synced 2025-10-15 19:42:07 +00:00
Refactor user validation
Validate each user field for creation/modification via API and web UI
This commit is contained in:
parent
291bf96d15
commit
e45cc2d2aa
40 changed files with 567 additions and 400 deletions
|
@ -29,11 +29,11 @@ func TestAllKeysHaveValue(t *testing.T) {
|
|||
switch value := v.(type) {
|
||||
case string:
|
||||
if value == "" {
|
||||
t.Fatalf(`The key %q for the language %q have an empty string as value`, k, language)
|
||||
t.Errorf(`The key %q for the language %q have an empty string as value`, k, language)
|
||||
}
|
||||
case []string:
|
||||
if len(value) == 0 {
|
||||
t.Fatalf(`The key %q for the language %q have an empty list as value`, k, language)
|
||||
t.Errorf(`The key %q for the language %q have an empty list as value`, k, language)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue