diff options
author | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-04-16 20:28:48 +0300 |
---|---|---|
committer | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-04-16 20:28:48 +0300 |
commit | d11ad5d9b40d8bf37da05ed055c82d9b555530fa (patch) | |
tree | 9cd03d3c4b7272ac45faa41f9b11ca6654cc27b9 /tests | |
parent | 8fdc00e9e7ce15dab4d2e54e541bcdcf0c56a2cb (diff) |
Improve PHPUnit integration tests for polls:share:* commands
Add proper test case for shares of type Contact and GenericUser.
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Integration/Command/Share/RemoveTest.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/Integration/Command/Share/RemoveTest.php b/tests/Integration/Command/Share/RemoveTest.php index ec0b4f2b..e947da4b 100644 --- a/tests/Integration/Command/Share/RemoveTest.php +++ b/tests/Integration/Command/Share/RemoveTest.php @@ -173,11 +173,33 @@ class RemoveTest extends TestCase { 'pollId' => 456, 'initialShares' => [ 'user' => ['user2', 'user3'], - 'email' => ['foo@example.com', 'bar@example.com', 'baz@example.com'], + 'email' => ['foo@example.com', 'baz@example.com'], + 'contact' => ['bar@example.com'], ], 'expectedShares' => [ 'user' => ['user2', 'user3'], - 'email' => ['foo@example.com', 'bar@example.com'], + 'email' => ['foo@example.com'], + 'contact' => ['bar@example.com'], + ], + ] + ], + [ + [ + 'id' => 789, + '--group' => ['group1'], + '--email' => ['foo@example.com', 'baz@example.com'], + ], + [ + 'pollId' => 789, + 'initialShares' => [ + 'user' => ['user1', 'user2'], + 'email' => ['foo@example.com'], + 'contact' => ['bar@example.com'], + 'external' => ['baz@example.com'], + ], + 'expectedShares' => [ + 'email' => ['foo@example.com'], + 'external' => ['baz@example.com'], ], ] ], |