Add tests for the duplicate PIREP via prefile/API

This commit is contained in:
Nabeel Shahzad
2018-01-02 14:31:00 -06:00
parent 9c319e73f9
commit 7700bd6683
6 changed files with 37 additions and 11 deletions

View File

@@ -171,10 +171,7 @@ class PIREPTest extends TestCase
*/
public function testDuplicatePireps()
{
$pirep = factory(Pirep::class)->create([
'created_at' => Carbon::now()->toDateTimeString(),
'updated_at' => Carbon::now()->toDateTimeString()
]);
$pirep = factory(Pirep::class)->create();
# This should find itself...
$dupe_pirep = $this->pirepSvc->findDuplicate($pirep);
@@ -187,8 +184,7 @@ class PIREPTest extends TestCase
$minutes = setting('pireps.duplicate_check_time') + 1;
$pirep = factory(Pirep::class)->create([
'created_at' => Carbon::now()->subMinutes($minutes)->toDateTimeString(),
'updated_at' => Carbon::now()->subMinutes($minutes)->toDateTimeString()
'created_at' => Carbon::now()->subMinutes($minutes)->toDateTimeString()
]);
# This should find itself...