]> source.dussan.org Git - redmine.git/commitdiff
Fixes failing tests on postgresql (#29894).
authorMarius Balteanu <marius.balteanu@zitec.com>
Fri, 3 May 2024 08:24:49 +0000 (08:24 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Fri, 3 May 2024 08:24:49 +0000 (08:24 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22808 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index 7b8147ece16d545a70965fc36cc620eb6c4dda11..f7c879188366dc882f2afd1ca176d7375221b118 100644 (file)
@@ -1981,7 +1981,13 @@ class IssuesControllerTest < Redmine::ControllerTest
     )
 
     assert_response :success
-    assert_include "\"#{User.find(1).name}\n#{User.find(3).name}\"", response.body
+
+    lines = CSV.parse(response.body)
+    # Issue with ID 2 is the second issue in the CSV
+    # Column 3 is watchers_users
+    watchers = lines[2][2].split("\n").sort
+
+    assert_equal [User.find(3).name, User.find(1).name], watchers
   end
 
   def test_index_with_estimated_hours_total