aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-07-12 21:57:27 +0200
committerHarald Eilertsen <haraldei@anduin.net>2023-07-12 21:57:27 +0200
commitb04e0d0fd4173f77f5035860df74ee43097b9256 (patch)
tree793e2f87c2322c52edeb7f0e6cd3c0195187dd79
parent3f9d5e11d1b2c47a69a929bb63479c49f6a52d7a (diff)
downloadvolse-hubzilla-b04e0d0fd4173f77f5035860df74ee43097b9256.tar.gz
volse-hubzilla-b04e0d0fd4173f77f5035860df74ee43097b9256.tar.bz2
volse-hubzilla-b04e0d0fd4173f77f5035860df74ee43097b9256.zip
tests: AccessListTest expand is_private test.
-rw-r--r--tests/unit/Access/AccessListTest.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/unit/Access/AccessListTest.php b/tests/unit/Access/AccessListTest.php
index 1b18a8340..2f185db17 100644
--- a/tests/unit/Access/AccessListTest.php
+++ b/tests/unit/Access/AccessListTest.php
@@ -160,6 +160,8 @@ class AccessListTest extends UnitTestCase {
}
/**
+ * The AccessList should be private if any of the fields are set,
+ *
* @dataProvider isprivateProvider
*/
public function testIsPrivate($channel) {
@@ -175,12 +177,30 @@ class AccessListTest extends UnitTestCase {
'channel_deny_cid' => '<dcid>',
'channel_deny_gid' => '<dgid>'
]],
- 'only one set' => [[
+ 'only allow_cid set' => [[
'channel_allow_cid' => '<acid>',
'channel_allow_gid' => '',
'channel_deny_cid' => '',
'channel_deny_gid' => ''
]],
+ 'only allow_gid set' => [[
+ 'channel_allow_cid' => '',
+ 'channel_allow_gid' => '<agid>',
+ 'channel_deny_cid' => '',
+ 'channel_deny_gid' => ''
+ ]],
+ 'only deny_cid set' => [[
+ 'channel_allow_cid' => '',
+ 'channel_allow_gid' => '',
+ 'channel_deny_cid' => '<dcid>',
+ 'channel_deny_gid' => ''
+ ]],
+ 'only deny_gid set' => [[
+ 'channel_allow_cid' => '',
+ 'channel_allow_gid' => '',
+ 'channel_deny_cid' => '',
+ 'channel_deny_gid' => '<dgid>'
+ ]],
'acid+null' => [[
'channel_allow_cid' => '<acid>',
'channel_allow_gid' => null,