|
@@ 130-139 (lines=10) @@
|
| 127 |
|
$this->assertEquals($expectedResponse, $response); |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
public function testDestroy() { |
| 131 |
|
$this->accountService->expects($this->once()) |
| 132 |
|
->method('delete') |
| 133 |
|
->with($this->equalTo($this->userId), $this->equalTo($this->accountId)); |
| 134 |
|
|
| 135 |
|
$response = $this->controller->destroy($this->accountId); |
| 136 |
|
|
| 137 |
|
$expectedResponse = new JSONResponse(); |
| 138 |
|
$this->assertEquals($expectedResponse, $response); |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
public function testDestroyDoesNotExist() { |
| 142 |
|
$this->accountService->expects($this->once()) |
|
@@ 141-151 (lines=11) @@
|
| 138 |
|
$this->assertEquals($expectedResponse, $response); |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
public function testDestroyDoesNotExist() { |
| 142 |
|
$this->accountService->expects($this->once()) |
| 143 |
|
->method('delete') |
| 144 |
|
->with($this->equalTo($this->userId), $this->equalTo($this->accountId)) |
| 145 |
|
->will($this->throwException(new \OCP\AppFramework\Db\DoesNotExistException('test'))); |
| 146 |
|
|
| 147 |
|
$response = $this->controller->destroy($this->accountId); |
| 148 |
|
|
| 149 |
|
$expectedResponse = new JSONResponse(); |
| 150 |
|
$this->assertEquals($expectedResponse, $response); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
public function testCreateAutoDetectSuccess() { |
| 154 |
|
$email = '[email protected]'; |