|
@@ 113-120 (lines=8) @@
|
| 110 |
|
/** |
| 111 |
|
* Tests for expired TempHash and that it redirects to the expired page |
| 112 |
|
*/ |
| 113 |
|
public function testAcceptExpiredTempHash() |
| 114 |
|
{ |
| 115 |
|
/** @var UserInvitation $invitation */ |
| 116 |
|
$invitation = $this->objFromFixture('UserInvitation', 'expired'); |
| 117 |
|
$response = $this->get($this->controller->Link('accept/' . $invitation->TempHash)); |
| 118 |
|
$this->assertEquals(302, $response->getStatusCode()); |
| 119 |
|
$this->assertEquals('/user/expired', $response->getHeader('Location')); |
| 120 |
|
} |
| 121 |
|
|
| 122 |
|
/** |
| 123 |
|
* Tests if a form is returned and that expected fields are present |
|
@@ 138-146 (lines=9) @@
|
| 135 |
|
/** |
| 136 |
|
* Tests that redirected to not found if has not found |
| 137 |
|
*/ |
| 138 |
|
public function testSaveInviteWrongHashError() |
| 139 |
|
{ |
| 140 |
|
$data = array( |
| 141 |
|
'HashID' => '432' |
| 142 |
|
); |
| 143 |
|
$response = $this->controller->saveInvite($data, $this->controller->AcceptForm()->loadDataFrom($data)); |
| 144 |
|
$this->assertEquals(302, $response->getStatusCode()); |
| 145 |
|
$this->assertEquals('/user/notfound', $response->getHeader('Location')); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
public function testSaveInvite() |
| 149 |
|
{ |