| @@ 114-121 (lines=8) @@ | ||
| 111 | * |
|
| 112 | * @return void |
|
| 113 | */ |
|
| 114 | public function testCanBeDeleteAndNotSeeInDB() |
|
| 115 | { |
|
| 116 | $user = $this->createUser(); |
|
| 117 | $data = ['name' => $user->name, 'email' => $user->email, 'avatar' => $user->avatar]; |
|
| 118 | ||
| 119 | $this->delete('/api/users/'.$user->id, ['X-Authorization' => $user->apiKey->key])->notSeeInDatabase('users', $data); |
|
| 120 | $this->get('/api/users')->dontSeeJson($data)->seeStatusCode(200); |
|
| 121 | } |
|
| 122 | } |
|
| 123 | ||
| @@ 217-224 (lines=8) @@ | ||
| 214 | * |
|
| 215 | * @return void |
|
| 216 | */ |
|
| 217 | public function testVideosCanBeDeletedAndNotSeenOnDatabase() |
|
| 218 | { |
|
| 219 | $user = $this->createUser(); |
|
| 220 | $video = $this->createFakeVideo($user); |
|
| 221 | $data = ['name' => $video->name, 'category' => $video->category, 'path' => $video->path]; |
|
| 222 | $this->delete('/api/videos/'.$video->id, ['X-Authorization' => $user->apiKey->key])->notSeeInDatabase('videos', $data); |
|
| 223 | $this->get('/api/videos')->dontSeeJson($data)->seeStatusCode(200); |
|
| 224 | } |
|
| 225 | ||
| 226 | /** |
|
| 227 | * Test videos can be search and see result. |
|