aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-09-12 21:25:00 -0700
committerDavid King <imkingdavid@gmail.com>2013-09-12 21:25:00 -0700
commitf22b959257deba0f00a4330df9103c47673032b8 (patch)
tree36ca640a1a9744c0a17260e85a25e159b9421de3 /tests
parentd62973867511d4f2b337a4c1cf3654ee20a2a107 (diff)
parent32b92547400c14a402f64463661ce7c1b44e81b3 (diff)
downloadforums-f22b959257deba0f00a4330df9103c47673032b8.tar
forums-f22b959257deba0f00a4330df9103c47673032b8.tar.gz
forums-f22b959257deba0f00a4330df9103c47673032b8.tar.bz2
forums-f22b959257deba0f00a4330df9103c47673032b8.tar.xz
forums-f22b959257deba0f00a4330df9103c47673032b8.zip
Merge pull request #1620 from EXreaction/ticket/11745
Group join approved notification
Diffstat (limited to 'tests')
-rw-r--r--tests/notification/group_request_test.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php
index 3606a6455c..368e4ae973 100644
--- a/tests/notification/group_request_test.php
+++ b/tests/notification/group_request_test.php
@@ -22,6 +22,7 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas
parent::get_notification_types(),
array(
'group_request',
+ 'group_request_approved',
)
);
}
@@ -76,5 +77,33 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas
'user_id' => 2,
)
);
+
+ // Approve user 3 joining the group
+ group_user_attributes('approve', $group_id, array(3));
+
+ // user 3 pending notification should have been deleted
+ $this->assert_notifications(
+ array(),
+ array(
+ 'user_id' => 2,
+ )
+ );
+
+ $this->assert_notifications(
+ array(
+ // user 3 approved notification
+ array(
+ 'item_id' => $group_id, // user_id of requesting join
+ 'user_id' => 3,
+ 'notification_read' => 0,
+ 'notification_data' => array(
+ 'group_name' => 'test',
+ ),
+ ),
+ ),
+ array(
+ 'user_id' => 3,
+ )
+ );
}
}