summaryrefslogtreecommitdiffstats
path: root/test/unit/project_copy_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-12 19:13:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-12 19:13:25 +0000
commitf9ddb562d58ae98bcc69f74396b028cbc8cce0b1 (patch)
tree8019be9178fb3d14c764c04e3e3a5be955de1385 /test/unit/project_copy_test.rb
parent136cdc765afda57b9be02704e52b27334da42c73 (diff)
downloadredmine-f9ddb562d58ae98bcc69f74396b028cbc8cce0b1.tar.gz
redmine-f9ddb562d58ae98bcc69f74396b028cbc8cce0b1.zip
Cleanup of finders with :conditions option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11963 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_copy_test.rb')
-rw-r--r--test/unit/project_copy_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/project_copy_test.rb b/test/unit/project_copy_test.rb
index 893e6653f..7499c07dc 100644
--- a/test/unit/project_copy_test.rb
+++ b/test/unit/project_copy_test.rb
@@ -63,7 +63,7 @@ class ProjectCopyTest < ActiveSupport::TestCase
assert_equal @project, issue.project
end
- copied_issue = @project.issues.first(:conditions => {:subject => "copy issue status"})
+ copied_issue = @project.issues.where(:subject => "copy issue status").first
assert copied_issue
assert copied_issue.status
assert_equal "Closed", copied_issue.status.name
@@ -93,7 +93,7 @@ class ProjectCopyTest < ActiveSupport::TestCase
assert @project.copy(@source_project)
@project.reload
- copied_issue = @project.issues.first(:conditions => {:subject => "copy issues assigned to a locked version"})
+ copied_issue = @project.issues.where(:subject => "copy issues assigned to a locked version").first
assert copied_issue
assert copied_issue.fixed_version
@@ -112,7 +112,7 @@ class ProjectCopyTest < ActiveSupport::TestCase
assert @project.copy(@source_project)
@project.reload
- copied_issue = @project.issues.first(:conditions => {:subject => "change the new issues to use the copied version"})
+ copied_issue = @project.issues.where(:subject => "change the new issues to use the copied version").first
assert copied_issue
assert copied_issue.fixed_version
@@ -128,7 +128,7 @@ class ProjectCopyTest < ActiveSupport::TestCase
assert @project.copy(@source_project)
@project.reload
- copied_issue = @project.issues.first(:conditions => {:subject => "keep target shared versions"})
+ copied_issue = @project.issues.where(:subject => "keep target shared versions").first
assert copied_issue
assert_equal assigned_version, copied_issue.fixed_version
@@ -175,7 +175,7 @@ class ProjectCopyTest < ActiveSupport::TestCase
@source_project.issues << issue
assert @project.copy(@source_project)
- copied_issue = @project.issues.first(:conditions => {:subject => "copy with attachment"})
+ copied_issue = @project.issues.where(:subject => "copy with attachment").first
assert_not_nil copied_issue
assert_equal 1, copied_issue.attachments.count, "Attachment not copied"
assert_equal "testfile.txt", copied_issue.attachments.first.filename