From 2d6f552599d0e632953372b7a942a5eaab099631 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Mon, 14 Mar 2022 14:25:24 +0000 Subject: Replace Member.find_or_new with ActiveRecord's find_or_initialize_by (#36730). git-svn-id: http://svn.redmine.org/redmine/trunk@21456 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/issues_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/integration/api_test/issues_test.rb') diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 64ac2d4c8..29b3390d2 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -437,7 +437,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base issue = Issue.find(1) assert_equal 1, issue.tracker_id # Bug issue.update(:status_id => 2) # Assigned - member = Member.find_or_new(issue.project, User.find_by_login('dlopper')) + member = Member.find_by(:project => issue.project, :user => User.find_by(:login => 'dlopper')) assert_equal [2], member.role_ids # Developer get '/issues/1.xml?include=allowed_statuses', :headers => credentials('dlopper', 'foo') -- cgit v1.2.3