Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' into feature/III-1772
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.json
  • Loading branch information
bertramakers committed May 4, 2017
2 parents 038bf0e + a18ac17 commit e95dd89
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/OfferSearchControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,30 @@ public function it_sets_a_default_available_from_and_available_to_if_none_are_gi
$this->controller->search($request);
}

/**
* @test
*/
public function it_expects_a_valid_available_from_and_available_to_date()
{
$request = Request::create(
'http://search.uitdatabank.be/offers/',
'GET',
[
'start' => 0,
'limit' => 0,
'availableFrom' => '2017-04-01',
'availableTo' => '2017-04-01',
]
);

$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage(
'availableFrom should be an ISO-8601 datetime, for example 2017-04-26T12:20:05+01:00'
);

$this->controller->search($request);
}

/**
* @test
*/
Expand Down

0 comments on commit e95dd89

Please sign in to comment.