aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-07-27 19:32:51 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2013-07-27 19:32:51 -0500
commit97204e432b8ff1c91294169d6fc0d822ef180bf1 (patch)
tree49f87b813f41b1ab1679ae842e294a1df6ba8a41 /tests/notification
parentMerge branch 'ticket/11744' of github.com:EXreaction/phpbb3 into ticket/11745 (diff)
downloadphpbb-97204e432b8ff1c91294169d6fc0d822ef180bf1.tar.gz
phpbb-97204e432b8ff1c91294169d6fc0d822ef180bf1.tar.bz2
phpbb-97204e432b8ff1c91294169d6fc0d822ef180bf1.zip
[ticket/11745] Add test for group request approved
PHPBB3-11745
Diffstat (limited to 'tests/notification')
-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,
+ )
+ );
}
}