@@ 192-207 (lines=16) @@ | ||
189 | } |
|
190 | ||
191 | /** @test */ |
|
192 | public function it_can_unsubscribe_someone() |
|
193 | { |
|
194 | $this->response->shouldReceive('success')->andReturn(true); |
|
195 | ||
196 | $this->client->shouldReceive('post')->withArgs([ |
|
197 | Resources::$ContactslistManagecontact,[ |
|
198 | 'id' => '123', |
|
199 | 'body' => [ |
|
200 | 'Email' => "[email protected]", |
|
201 | 'Action' => "unsub", |
|
202 | ] |
|
203 | ] |
|
204 | ||
205 | ])->andReturn($this->response); |
|
206 | $this->newsletter->unsubscribe('[email protected]'); |
|
207 | } |
|
208 | ||
209 | /** @test */ |
|
210 | public function it_will_trow_an_exception_when_unsubscribe_someone() |
|
@@ 230-246 (lines=17) @@ | ||
227 | } |
|
228 | ||
229 | /** @test */ |
|
230 | public function it_can_delete_someone() |
|
231 | { |
|
232 | $this->response->shouldReceive('success')->andReturn(true); |
|
233 | ||
234 | $this->client->shouldReceive('post')->withArgs([ |
|
235 | Resources::$ContactslistManagecontact,[ |
|
236 | 'id' => '123', |
|
237 | 'body' => [ |
|
238 | 'Email' => "[email protected]", |
|
239 | 'Action' => "remove", |
|
240 | ] |
|
241 | ] |
|
242 | ||
243 | ])->andReturn($this->response); |
|
244 | ||
245 | $this->newsletter->delete('[email protected]'); |
|
246 | } |
|
247 | ||
248 | /** @test */ |
|
249 | public function it_will_trow_an_exception_when_delete_someone() |