1
0
Fork 0
forked from forgejo/forgejo

[MODERATION] Remove deadcode (squash)

- Remove deadcode that's no longer used by Forgejo.
This commit is contained in:
Gusted 2023-11-10 21:44:53 +01:00
parent 12ddd2b10e
commit 0faeab4fa9
No known key found for this signature in database
GPG key ID: FD821B732837125F
3 changed files with 0 additions and 29 deletions

View file

@ -26,23 +26,6 @@ func TestIsWatching(t *testing.T) {
assert.False(t, repo_model.IsWatching(db.DefaultContext, unittest.NonexistentID, unittest.NonexistentID))
}
func TestGetWatchers(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
watches, err := repo_model.GetWatchers(db.DefaultContext, repo.ID)
assert.NoError(t, err)
// One watchers are inactive, thus minus 1
assert.Len(t, watches, repo.NumWatches-1)
for _, watch := range watches {
assert.EqualValues(t, repo.ID, watch.RepoID)
}
watches, err = repo_model.GetWatchers(db.DefaultContext, unittest.NonexistentID)
assert.NoError(t, err)
assert.Len(t, watches, 0)
}
func TestGetWatchersExcludeBlocked(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())