|
|
@@ -648,6 +648,21 @@ func TestToggleStarredEndpoint(t *testing.T) {
|
|
|
if entry.Starred {
|
|
|
t.Fatalf(`The entry should no longer be starred`)
|
|
|
}
|
|
|
+
|
|
|
+ nonExistingEntryID := int64(math.MaxInt64)
|
|
|
+ if err := regularUserClient.ToggleStarred(nonExistingEntryID); !errors.Is(err, miniflux.ErrNotFound) {
|
|
|
+ t.Fatalf(`Expected Not Found when toggling the starred flag of a non existent entry: %v`, err)
|
|
|
+ }
|
|
|
+
|
|
|
+ otherUserClient, _ := newRegularUser(t)
|
|
|
+
|
|
|
+ otherFeedID := fixture.Subscribe(t, otherUserClient)
|
|
|
+
|
|
|
+ result = listFeedEntries(t, otherUserClient, otherFeedID, &miniflux.Filter{Limit: 1})
|
|
|
+
|
|
|
+ if err := regularUserClient.ToggleStarred(result.Entries[0].ID); !errors.Is(err, miniflux.ErrNotFound) {
|
|
|
+ t.Fatalf(`Expected Not Found when toggling the starred flag of another user's entry: %v`, err)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func TestShareEntryEndpoint(t *testing.T) {
|