Strip timestamps from comparison for api tests, in an attempt to fix the test failures. (#5847)

This commit is contained in:
Daniel Meltzer
2018-07-16 16:41:51 -05:00
committed by snipe
parent 8f6e0ad5be
commit dcf72ce2da
13 changed files with 168 additions and 13 deletions
+2 -1
View File
@@ -33,7 +33,7 @@ class ApiUsersCest
$user = App\Models\User::orderByDesc('created_at')
->withCount('assets', 'licenses', 'accessories', 'consumables')
->take(10)->get()->shuffle()->first();
$I->seeResponseContainsJson((new UsersTransformer)->transformUser($user));
$I->seeResponseContainsJson($I->removeTimestamps((new UsersTransformer)->transformUser($user)));
}
/** @test */
@@ -124,6 +124,7 @@ class ApiUsersCest
// update
$I->sendPATCH('/users/' . $user->id, $data);
$I->seeResponseIsJson();
$I->seeResponseCodeIs(200);
$response = json_decode($I->grabResponse());