summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/helpers/groups_helper_test.rb1
-rw-r--r--test/unit/helpers/issues_helper_test.rb4
-rw-r--r--test/unit/helpers/members_helper_test.rb1
-rw-r--r--test/unit/lib/redmine/helpers/gantt_test.rb2
-rw-r--r--test/unit/lib/redmine/menu_manager/menu_helper_test.rb5
-rw-r--r--test/unit/lib/redmine/views/labelled_form_builder_test.rb3
-rw-r--r--test/unit/lib/redmine/wiki_formatting/macros_test.rb3
7 files changed, 12 insertions, 7 deletions
diff --git a/test/unit/helpers/groups_helper_test.rb b/test/unit/helpers/groups_helper_test.rb
index b927a1d72..3f106287c 100644
--- a/test/unit/helpers/groups_helper_test.rb
+++ b/test/unit/helpers/groups_helper_test.rb
@@ -21,6 +21,7 @@ class GroupsHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include GroupsHelper
+ include Rails.application.routes.url_helpers
fixtures :users
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb
index 0a31ddb3b..514d8314e 100644
--- a/test/unit/helpers/issues_helper_test.rb
+++ b/test/unit/helpers/issues_helper_test.rb
@@ -56,14 +56,14 @@ class IssuesHelperTest < Redmine::HelperTest
end
def test_issues_destroy_confirmation_message_with_one_parent_issue
- Issue.find(2).update_attribute :parent_issue_id, 1
+ Issue.find(2).update! :parent_issue_id => 1
assert_equal l(:text_issues_destroy_confirmation) + "\n" +
l(:text_issues_destroy_descendants_confirmation, :count => 1),
issues_destroy_confirmation_message(Issue.find(1))
end
def test_issues_destroy_confirmation_message_with_one_parent_issue_and_its_child
- Issue.find(2).update_attribute :parent_issue_id, 1
+ Issue.find(2).update! :parent_issue_id => 1
assert_equal l(:text_issues_destroy_confirmation),
issues_destroy_confirmation_message(Issue.find([1, 2]))
end
diff --git a/test/unit/helpers/members_helper_test.rb b/test/unit/helpers/members_helper_test.rb
index 0f2cf8939..0cda5d67f 100644
--- a/test/unit/helpers/members_helper_test.rb
+++ b/test/unit/helpers/members_helper_test.rb
@@ -21,6 +21,7 @@ class MembersHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include MembersHelper
+ include Rails.application.routes.url_helpers
fixtures :projects, :users, :members, :member_roles,
:trackers, :issue_statuses
diff --git a/test/unit/lib/redmine/helpers/gantt_test.rb b/test/unit/lib/redmine/helpers/gantt_test.rb
index fcfed88ce..eb1338af6 100644
--- a/test/unit/lib/redmine/helpers/gantt_test.rb
+++ b/test/unit/lib/redmine/helpers/gantt_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../../../test_helper', __FILE__)
-class Redmine::Helpers::GanttHelperTest < ActionView::TestCase
+class Redmine::Helpers::GanttHelperTest < Redmine::HelperTest
fixtures :projects, :trackers, :issue_statuses,
:enumerations, :users, :issue_categories
diff --git a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb
index e19f066e0..40fd16a11 100644
--- a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb
+++ b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb
@@ -17,10 +17,11 @@
require File.expand_path('../../../../../test_helper', __FILE__)
-class Redmine::MenuManager::MenuHelperTest < ActionView::TestCase
-
+class Redmine::MenuManager::MenuHelperTest < Redmine::HelperTest
include Redmine::MenuManager::MenuHelper
include ERB::Util
+ include Rails.application.routes.url_helpers
+
fixtures :users, :members, :projects, :enabled_modules, :roles, :member_roles
def setup
diff --git a/test/unit/lib/redmine/views/labelled_form_builder_test.rb b/test/unit/lib/redmine/views/labelled_form_builder_test.rb
index ad3c35cc5..2680c83c6 100644
--- a/test/unit/lib/redmine/views/labelled_form_builder_test.rb
+++ b/test/unit/lib/redmine/views/labelled_form_builder_test.rb
@@ -17,7 +17,8 @@
require File.expand_path('../../../../../test_helper', __FILE__)
-class Redmine::Views::LabelledFormBuilderTest < ActionView::TestCase
+class Redmine::Views::LabelledFormBuilderTest < Redmine::HelperTest
+ include Rails.application.routes.url_helpers
def test_label_should_output_one_element
set_language_if_valid 'en'
diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
index e47446d74..1a7b93021 100644
--- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
@@ -17,11 +17,12 @@
require File.expand_path('../../../../../test_helper', __FILE__)
-class Redmine::WikiFormatting::MacrosTest < ActionView::TestCase
+class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
include ApplicationHelper
include ActionView::Helpers::TextHelper
include ActionView::Helpers::SanitizeHelper
include ERB::Util
+ include Rails.application.routes.url_helpers
extend ActionView::Helpers::SanitizeHelper::ClassMethods
fixtures :projects, :roles, :enabled_modules, :users,