From 10d96bfd668f445249190c52bedb2eb0e7e9410d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 22 Jan 2017 22:38:00 -0500 Subject: Add user invitations --- tests/units/Model/InviteModelTest.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/units/Model/InviteModelTest.php (limited to 'tests') diff --git a/tests/units/Model/InviteModelTest.php b/tests/units/Model/InviteModelTest.php new file mode 100644 index 00000000..3a0519fb --- /dev/null +++ b/tests/units/Model/InviteModelTest.php @@ -0,0 +1,27 @@ +container); + + $this->container['emailClient'] + ->expects($this->exactly(2)) + ->method('send'); + + $inviteModel->createInvites(array('user@domain1.tld', '', 'user@domain2.tld'), 1); + } + + public function testRemove() + { + $inviteModel = new InviteModel($this->container); + $inviteModel->createInvites(array('user@domain1.tld', 'user@domain2.tld'), 0); + $this->assertTrue($inviteModel->remove('user@domain1.tld')); + $this->assertFalse($inviteModel->remove('foobar')); + } +} -- cgit v1.2.3