diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-10-25 01:36:19 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-10-24 20:36:19 +0300 |
commit | 6eeadb2082193f8e3dc5269dfc6da2daef7eb6a1 (patch) | |
tree | d28d3be3451194e98a5c01097347e7eebdb6393f /models/notification_test.go | |
parent | 03900303a9500b33b33ff03fd6dd325147a1117e (diff) | |
download | gitea-6eeadb2082193f8e3dc5269dfc6da2daef7eb6a1.tar.gz gitea-6eeadb2082193f8e3dc5269dfc6da2daef7eb6a1.zip |
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
Diffstat (limited to 'models/notification_test.go')
-rw-r--r-- | models/notification_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/models/notification_test.go b/models/notification_test.go index c1b7d50529..07d9ee764c 100644 --- a/models/notification_test.go +++ b/models/notification_test.go @@ -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) { |