mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-07-15 21:31:36 +03:00
Testing: Changed ordering in tests to help prevent flaky test
Think it would primariy use the created_at ordering based in the relation which could cause trouble in CI test environment. This better forces Id based ordering
This commit is contained in:
@@ -218,10 +218,10 @@ class WatchTest extends TestCase
|
||||
|
||||
$notifications = Notification::fake();
|
||||
|
||||
$this->actingAs($editor)->post("/comment/{$entities['page']->id}", [
|
||||
$resp = $this->actingAs($editor)->post("/comment/{$entities['page']->id}", [
|
||||
'html' => '<p>My new comment</p>'
|
||||
]);
|
||||
$comment = $entities['page']->comments()->orderBy('id', 'desc')->first();
|
||||
$comment = $entities['page']->comments()->reorder('id', 'desc')->first();
|
||||
|
||||
$this->asAdmin()->post("/comment/{$entities['page']->id}", [
|
||||
'html' => '<p>My new comment response</p>',
|
||||
|
||||
Reference in New Issue
Block a user