Return the flight object with the bid

This commit is contained in:
Nabeel Shahzad
2018-02-27 13:11:48 -06:00
parent 4c22a098c1
commit a38b4e063b
3 changed files with 25 additions and 9 deletions

View File

@@ -235,10 +235,10 @@ class FlightTest extends TestCase
$uri = '/api/user/bids';
$data = ['flight_id' => $flight->id];
$body = $this->put($uri, $data)->json('data');
$body = $this->put($uri, $data);
$body = $body->json('data');
$this->assertCount(1, $body);
$this->assertEquals($body[0]['id'], $flight->id);
$this->assertEquals($body['flight_id'], $flight->id);
# Now try to have the second user bid on it
# Should return a 409 error