aboutsummaryrefslogtreecommitdiffstats
path: root/t/open311
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-05-04 22:24:12 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-05-05 11:03:52 +0100
commit5dac64b6b448f3ce34ce4392b0efb34d49b2011f (patch)
tree164c77c83d5010ca3d362fa8b7fca24e655780a5 /t/open311
parentdfdfa76375e39274d6b8ff2a06954b4d5530586d (diff)
Fix unpredictable tests.
The database could return rows in differing orders.
Diffstat (limited to 't/open311')
-rw-r--r--t/open311/getservicerequestupdates.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/open311/getservicerequestupdates.t b/t/open311/getservicerequestupdates.t
index 35be0f7b5..4651c38b2 100644
--- a/t/open311/getservicerequestupdates.t
+++ b/t/open311/getservicerequestupdates.t
@@ -1057,7 +1057,7 @@ for my $test (
$problem->discard_changes;
is $problem->comments->count, 2, 'two comment after fetching updates';
- my @comments = $problem->comments;
+ my @comments = $problem->comments->search(undef, { order_by => 'confirmed' });
is $comments[0]->text, "Thank you for your report. We will provide an update within 48 hours.", "correct external status code on first comment";
is $comments[1]->text, "Thank you for your report. We will provide an update within 24 hours.", "correct external status code on second comment";