aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-06-04 17:30:22 +0200
committerAndreas Fischer <bantu@phpbb.com>2013-06-04 17:30:22 +0200
commit7b7747cab687c0c2eae05d67110a1e09e1d528be (patch)
tree6e0d33682ba07354dac0545d5588634498b960ea /tests/functional
parent74da9e32e5a3eafb942c4a5ab58c642654cf582e (diff)
parent71deb4dde7f0d92905c13b79c92b5ccc6beeb3c3 (diff)
downloadforums-7b7747cab687c0c2eae05d67110a1e09e1d528be.tar
forums-7b7747cab687c0c2eae05d67110a1e09e1d528be.tar.gz
forums-7b7747cab687c0c2eae05d67110a1e09e1d528be.tar.bz2
forums-7b7747cab687c0c2eae05d67110a1e09e1d528be.tar.xz
forums-7b7747cab687c0c2eae05d67110a1e09e1d528be.zip
Merge remote-tracking branch 'marc1706/ticket/11538' into develop
* marc1706/ticket/11538: [ticket/11538] Add admin as admins leader and moderator in memberlist_test
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/common_groups_test.php6
-rw-r--r--tests/functional/memberlist_test.php12
2 files changed, 12 insertions, 6 deletions
diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php
index cc6afa54b9..7ccd78421e 100644
--- a/tests/functional/common_groups_test.php
+++ b/tests/functional/common_groups_test.php
@@ -30,12 +30,6 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
*/
public function test_groups_manage($input, $expected)
{
- $this->markTestIncomplete(
- 'Test fails on develop due to another test deleting the Administrators group.'
- );
- // See https://github.com/phpbb/phpbb3/pull/1407#issuecomment-18465480
- // and https://gist.github.com/bantu/22dc4f6c6c0b8f9e0fa1
-
$this->login();
$this->admin_login();
$this->add_lang(array('ucp', 'acp/groups'));
diff --git a/tests/functional/memberlist_test.php b/tests/functional/memberlist_test.php
index 92ede8bd04..e9739f5f9a 100644
--- a/tests/functional/memberlist_test.php
+++ b/tests/functional/memberlist_test.php
@@ -95,5 +95,17 @@ class phpbb_functional_memberlist_test extends phpbb_functional_test_case
$crawler = $this->get_memberlist_leaders_table_crawler();
$this->assertNotContains('memberlist-test-moderator', $crawler->eq(0)->text());
$this->assertContains('memberlist-test-moderator', $crawler->eq(1)->text());
+
+ // Add admin to moderators, should be visible as moderator
+ $this->add_user_group('GLOBAL_MODERATORS', array('admin'), true);
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+ $this->assertNotContains('admin', $crawler->eq(0)->text());
+ $this->assertContains('admin', $crawler->eq(1)->text());
+
+ // Add admin to admins as leader, should be visible as admin, not moderator
+ $this->add_user_group('ADMINISTRATORS', array('admin'), true, true);
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+ $this->assertContains('admin', $crawler->eq(0)->text());
+ $this->assertNotContains('admin', $crawler->eq(1)->text());
}
}