1
0
Fork 0
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:
Frédéric Guillot 2020-12-13 18:50:28 -08:00 committed by fguillot
parent 70effdc706
commit 5922a7a051
3 changed files with 38 additions and 12 deletions

View file

@ -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)
}
}