summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-22 08:26:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-22 08:26:45 +0000
commit1c31e32df737a6289486b69d971bba44785ac166 (patch)
tree19220e4413d7594970aa53dda9ab6f8ea04aa39a
parent4598c64ebd6d07b0e0f24e4bedf667d7c4fd3d57 (diff)
downloadredmine-1c31e32df737a6289486b69d971bba44785ac166.tar.gz
redmine-1c31e32df737a6289486b69d971bba44785ac166.zip
No need to save journal details.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9467 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/unit/helpers/issues_helper_test.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb
index e227b40f9..b8c1dd048 100644
--- a/test/unit/helpers/issues_helper_test.rb
+++ b/test/unit/helpers/issues_helper_test.rb
@@ -133,65 +133,65 @@ class IssuesHelperTest < ActionView::TestCase
end
should "show old and new values with a project attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'project_id', :old_value => 1, :value => 2)
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'project_id', :old_value => 1, :value => 2)
assert_match 'eCookbook', show_detail(detail, true)
assert_match 'OnlineStore', show_detail(detail, true)
end
should "show old and new values with a issue status attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'status_id', :old_value => 1, :value => 2)
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'status_id', :old_value => 1, :value => 2)
assert_match 'New', show_detail(detail, true)
assert_match 'Assigned', show_detail(detail, true)
end
should "show old and new values with a tracker attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'tracker_id', :old_value => 1, :value => 2)
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'tracker_id', :old_value => 1, :value => 2)
assert_match 'Bug', show_detail(detail, true)
assert_match 'Feature request', show_detail(detail, true)
end
should "show old and new values with a assigned to attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'assigned_to_id', :old_value => 1, :value => 2)
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'assigned_to_id', :old_value => 1, :value => 2)
assert_match 'redMine Admin', show_detail(detail, true)
assert_match 'John Smith', show_detail(detail, true)
end
should "show old and new values with a priority attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'priority_id', :old_value => 4, :value => 5)
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'priority_id', :old_value => 4, :value => 5)
assert_match 'Low', show_detail(detail, true)
assert_match 'Normal', show_detail(detail, true)
end
should "show old and new values with a category attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'category_id', :old_value => 1, :value => 2)
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'category_id', :old_value => 1, :value => 2)
assert_match 'Printing', show_detail(detail, true)
assert_match 'Recipes', show_detail(detail, true)
end
should "show old and new values with a fixed version attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'fixed_version_id', :old_value => 1, :value => 2)
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'fixed_version_id', :old_value => 1, :value => 2)
assert_match '0.1', show_detail(detail, true)
assert_match '1.0', show_detail(detail, true)
end
should "show old and new values with a estimated hours attribute" do
- detail = JournalDetail.generate!(:property => 'attr', :prop_key => 'estimated_hours', :old_value => '5', :value => '6.3')
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'estimated_hours', :old_value => '5', :value => '6.3')
assert_match '5.00', show_detail(detail, true)
assert_match '6.30', show_detail(detail, true)
end
should "show old and new values with a custom field" do
- detail = JournalDetail.generate!(:property => 'cf', :prop_key => '1', :old_value => 'MySQL', :value => 'PostgreSQL')
+ detail = JournalDetail.new(:property => 'cf', :prop_key => '1', :old_value => 'MySQL', :value => 'PostgreSQL')
assert_equal 'Database changed from MySQL to PostgreSQL', show_detail(detail, true)
end
should "show added file" do
- detail = JournalDetail.generate!(:property => 'attachment', :prop_key => '1', :old_value => nil, :value => 'error281.txt')
+ detail = JournalDetail.new(:property => 'attachment', :prop_key => '1', :old_value => nil, :value => 'error281.txt')
assert_match 'error281.txt', show_detail(detail, true)
end
should "show removed file" do
- detail = JournalDetail.generate!(:property => 'attachment', :prop_key => '1', :old_value => 'error281.txt', :value => nil)
+ detail = JournalDetail.new(:property => 'attachment', :prop_key => '1', :old_value => 'error281.txt', :value => nil)
assert_match 'error281.txt', show_detail(detail, true)
end
end