@@ 84-91 (lines=8) @@ | ||
81 | /** |
|
82 | * Tests for expired TempHash and that it redirects to the expired page |
|
83 | */ |
|
84 | public function testAcceptExpiredTempHash() |
|
85 | { |
|
86 | /** @var UserInvitation $invitation */ |
|
87 | $invitation = $this->objFromFixture('UserInvitation', 'expired'); |
|
88 | $response = $this->get($this->controller->Link('accept/' . $invitation->TempHash)); |
|
89 | $this->assertEquals(302, $response->getStatusCode()); |
|
90 | $this->assertEquals('/user/expired', $response->getHeader('Location')); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * Tests if a form is returned and that expected fields are present |
|
@@ 109-117 (lines=9) @@ | ||
106 | /** |
|
107 | * Tests that redirected to not found if has not found |
|
108 | */ |
|
109 | public function testSaveInviteWrongHashError() |
|
110 | { |
|
111 | $data = array( |
|
112 | 'HashID' => '432' |
|
113 | ); |
|
114 | $response = $this->controller->saveInvite($data, $this->controller->AcceptForm()->loadDataFrom($data)); |
|
115 | $this->assertEquals(302, $response->getStatusCode()); |
|
116 | $this->assertEquals('/user/notfound', $response->getHeader('Location')); |
|
117 | } |
|
118 | ||
119 | public function testSaveInvite() |
|
120 | { |