summaryrefslogtreecommitdiffstats
path: root/test/unit/project_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
commit31c33f462d92aead29b8feb6445d8fe5626c4963 (patch)
tree0818c626e553e1cbb606e9c23a7342583288d448 /test/unit/project_test.rb
parent013c6fe009e74892659c64c2936a2668a9663985 (diff)
downloadredmine-31c33f462d92aead29b8feb6445d8fe5626c4963.tar.gz
redmine-31c33f462d92aead29b8feb6445d8fe5626c4963.zip
Replaces find(:first) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10928 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r--test/unit/project_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 28a478e60..4c1441747 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -707,7 +707,7 @@ class ProjectTest < ActiveSupport::TestCase
def test_activities_should_not_include_the_inactive_project_specific_activities
project = Project.find(1)
- overridden_activity = TimeEntryActivity.new({:name => "Project", :project => project, :parent => TimeEntryActivity.find(:first), :active => false})
+ overridden_activity = TimeEntryActivity.new({:name => "Project", :project => project, :parent => TimeEntryActivity.first, :active => false})
assert overridden_activity.save!
assert !project.activities.include?(overridden_activity), "Inactive Project specific Activity found"
@@ -722,7 +722,7 @@ class ProjectTest < ActiveSupport::TestCase
end
def test_activities_should_handle_nils
- overridden_activity = TimeEntryActivity.new({:name => "Project", :project => Project.find(1), :parent => TimeEntryActivity.find(:first)})
+ overridden_activity = TimeEntryActivity.new({:name => "Project", :project => Project.find(1), :parent => TimeEntryActivity.first})
TimeEntryActivity.delete_all
# No activities
@@ -737,7 +737,7 @@ class ProjectTest < ActiveSupport::TestCase
def test_activities_should_override_system_activities_with_project_activities
project = Project.find(1)
- parent_activity = TimeEntryActivity.find(:first)
+ parent_activity = TimeEntryActivity.first
overridden_activity = TimeEntryActivity.new({:name => "Project", :project => project, :parent => parent_activity})
assert overridden_activity.save!
@@ -747,7 +747,7 @@ class ProjectTest < ActiveSupport::TestCase
def test_activities_should_include_inactive_activities_if_specified
project = Project.find(1)
- overridden_activity = TimeEntryActivity.new({:name => "Project", :project => project, :parent => TimeEntryActivity.find(:first), :active => false})
+ overridden_activity = TimeEntryActivity.new({:name => "Project", :project => project, :parent => TimeEntryActivity.first, :active => false})
assert overridden_activity.save!
assert project.activities(true).include?(overridden_activity), "Inactive Project specific Activity not found"