Example #1
0
 /**
  * @test
  * @return void
  */
 public function it_can_delete_an_item()
 {
     DB::beginTransaction();
     $this->logInUser();
     $item = Item::first();
     $response = $this->call('DELETE', '/api/items/' . $item->id);
     $this->assertEquals(204, $response->getStatusCode());
     $response = $this->call('DELETE', '/api/item/' . $item->id);
     $this->assertEquals(404, $response->getStatusCode());
     DB::rollBack();
 }