@@ 53-62 (lines=10) @@ | ||
50 | /** |
|
51 | * Tests that invitations can't be re-sent. |
|
52 | */ |
|
53 | public function testInvitationAlreadySent() |
|
54 | { |
|
55 | $invite = UserInvitation::create(array( |
|
56 | 'FirstName' => 'Joe', |
|
57 | 'Email' => '[email protected]' |
|
58 | )); |
|
59 | $result = $invite->validate(); |
|
60 | $this->assertFalse($result->valid()); |
|
61 | $this->assertEquals('This user was already sent an invite.', $result->message()); |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * Tests that duplicate members can't be created |
|
@@ 67-76 (lines=10) @@ | ||
64 | /** |
|
65 | * Tests that duplicate members can't be created |
|
66 | */ |
|
67 | public function testMemberAlreadyExists() |
|
68 | { |
|
69 | $invite = UserInvitation::create(array( |
|
70 | 'FirstName' => 'Jane', |
|
71 | 'Email' => '[email protected]' |
|
72 | )); |
|
73 | $result = $invite->validate(); |
|
74 | $this->assertFalse($result->valid()); |
|
75 | $this->assertEquals('This person is already a member of this system.', $result->message()); |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * Tests that a random hash and the logged in users id was added |