mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-25 03:00:04 +02:00
Hide unactive on explore users and some refactors (#2741)
* hide unactive on explore users and some refactors * fix test for removed Organizations * fix test for removed Organizations * fix imports * fix logic bug * refactor the toConds * Rename TestOrganizations to TestSearchUsers and add tests for users * fix other tests * fix other tests * fix watchers tests * fix comments and remove unused code
This commit is contained in:
parent
03900303a9
commit
6eeadb2082
15 changed files with 143 additions and 151 deletions
|
@ -16,10 +16,13 @@ func TestCreateOrUpdateIssueNotifications(t *testing.T) {
|
|||
|
||||
assert.NoError(t, CreateOrUpdateIssueNotifications(issue, 2))
|
||||
|
||||
// Two watchers are inactive, thus only notification for user 10 is created
|
||||
notf := AssertExistsAndLoadBean(t, &Notification{UserID: 10, IssueID: issue.ID}).(*Notification)
|
||||
// User 9 is inactive, thus notifications for user 1 and 4 are created
|
||||
notf := AssertExistsAndLoadBean(t, &Notification{UserID: 1, IssueID: issue.ID}).(*Notification)
|
||||
assert.Equal(t, NotificationStatusUnread, notf.Status)
|
||||
CheckConsistencyFor(t, &Issue{ID: issue.ID})
|
||||
|
||||
notf = AssertExistsAndLoadBean(t, &Notification{UserID: 4, IssueID: issue.ID}).(*Notification)
|
||||
assert.Equal(t, NotificationStatusUnread, notf.Status)
|
||||
}
|
||||
|
||||
func TestNotificationsForUser(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue