summaryrefslogtreecommitdiffstats
path: root/models/action_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/action_test.go')
-rw-r--r--models/action_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/models/action_test.go b/models/action_test.go
index e247a5ec29..fb8a6c2686 100644
--- a/models/action_test.go
+++ b/models/action_test.go
@@ -211,3 +211,20 @@ func TestNotifyWatchers(t *testing.T) {
OpType: action.OpType,
})
}
+
+func TestGetFeedsCorrupted(t *testing.T) {
+ assert.NoError(t, unittest.PrepareTestDatabase())
+ user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}).(*user_model.User)
+ unittest.AssertExistsAndLoadBean(t, &Action{
+ ID: 8,
+ RepoID: 1700,
+ })
+
+ actions, err := GetFeeds(db.DefaultContext, GetFeedsOptions{
+ RequestedUser: user,
+ Actor: user,
+ IncludePrivate: true,
+ })
+ assert.NoError(t, err)
+ assert.Len(t, actions, 0)
+}