mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Renaming non-existent category via API should returns a 404
This commit is contained in:
parent
70effdc706
commit
5922a7a051
3 changed files with 38 additions and 12 deletions
|
@ -79,7 +79,16 @@ func TestUpdateCategory(t *testing.T) {
|
|||
}
|
||||
|
||||
if category.Title != categoryName {
|
||||
t.Fatalf(`Invalid title, got "%v" instead of "%v"`, category.Title, categoryName)
|
||||
t.Fatalf(`Invalid title, got %q instead of %q`, category.Title, categoryName)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateInexistingCategory(t *testing.T) {
|
||||
client := createClient(t)
|
||||
|
||||
_, err := client.UpdateCategory(4200000, "Test")
|
||||
if err != miniflux.ErrNotFound {
|
||||
t.Errorf(`Updating an inexisting category should returns a 404 instead of %v`, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue