diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-20 06:06:27 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-20 06:06:27 +0000 |
commit | 218218b78361fc3fd4ea572ce51533d34e8ab64d (patch) | |
tree | 002a841461e4d5b6d8f2f7bd6ecdcb53e0745da3 /test/integration | |
parent | bfcddc269246b940ffbb1289b9d2d0a0c3f80b31 (diff) | |
download | redmine-218218b78361fc3fd4ea572ce51533d34e8ab64d.tar.gz redmine-218218b78361fc3fd4ea572ce51533d34e8ab64d.zip |
Fix flacky test after Rails 7 update which fails occasionally because database records are not ordered, so it is necessary to specify the sort order when testing (#36320).
Patch by Takashi Kato (user:tohosaku).
git-svn-id: https://svn.redmine.org/redmine/trunk@22964 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/issues_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 84abe70ed..02840b2ef 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -242,7 +242,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base assert_select 'issue journals[type=array]' do assert_select 'journal[id="1"]' do - assert_select 'updated_on', :text => Issue.find(1).journals[0].updated_on.iso8601 + assert_select 'updated_on', :text => Issue.find(1).journals.order(:id)[0].updated_on.iso8601 assert_select 'updated_by[id="1"][name="Redmine Admin"]' assert_select 'private_notes', :text => 'false' assert_select 'details[type=array]' do |