dont show bid to carriers if closed
This commit is contained in:
parent
1910581053
commit
d9581cf991
3 changed files with 22 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ class GetBidForCarrierTest extends TestCase
|
|||
$this->expectException(InvalidArgumentException::class);
|
||||
$bidId = '12345abcd';
|
||||
$dto = new GetBidForCarrierRequest($bidId);
|
||||
$foundBid = $this->useCase->execute($dto);
|
||||
$this->useCase->execute($dto);
|
||||
}
|
||||
|
||||
public function test_first_view_flips_opened_flag(): void
|
||||
|
|
@ -46,4 +46,21 @@ class GetBidForCarrierTest extends TestCase
|
|||
);
|
||||
$this->assertEquals(true, $foundBid->getWasOpened());
|
||||
}
|
||||
|
||||
public function test_getting_closed_bid_returns_null(): void
|
||||
{
|
||||
$this->bidRepo->save(new Bid(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
true,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
));
|
||||
$this->assertNull($this->useCase->execute(
|
||||
new GetBidForCarrierRequest(0),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue