summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-09-13 17:14:35 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-09-13 17:14:35 +0000
commit7b0cb6aba8715aff00519f200060fbf46ae9bb97 (patch)
treec4dc3bcac1a48020c2afef87094056a9a5e06b6f /test
parentfb349dc4abe283481984c67cd1287312f128dbfc (diff)
downloadredmine-7b0cb6aba8715aff00519f200060fbf46ae9bb97.tar.gz
redmine-7b0cb6aba8715aff00519f200060fbf46ae9bb97.zip
Upgraded to Rails 2.3.4 (#3597)
* Ran the Rails upgrade * Upgraded to Rails Engines 2.3.2 * Added a plugin to let Engines override application views. * Converted tests to use the new classes: ** ActionController::TestCase for functional ** ActiveSupport::TestCase for units * Converted ActiveRecord::Error message to a string. * ActiveRecord grouping returns an ordered hash which doesn't have #sort! * Updated the I18n storage_units format. * Added some default initializers from a fresh rails app * Changed the order of check_box_tags and hidden_field_tags. The hidden tag needs to appear first in Rails 2.3, otherwise it will override any value in the check_box_tag. * Removed the custom handler for when the cookie store is tampered with. Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not load the data from it when it's been tampered with (e.g. no user login). * Fixed mail layouts, 2.3 has problems with implicit multipart emails that use layouts. Also removed some custom Redmine mailer code. * Fixed a bug that occurred in tests where the "required" span tag would be added to the :field_status translation. This resulted in an email string of: <li>Status<span class="required"> *</span><span class="required"> *</span> Instead of: <li>Status: New</li> git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/account_controller_test.rb2
-rw-r--r--test/functional/admin_controller_test.rb2
-rw-r--r--test/functional/application_controller_test.rb4
-rw-r--r--test/functional/attachments_controller_test.rb2
-rw-r--r--test/functional/boards_controller_test.rb2
-rw-r--r--test/functional/custom_fields_controller_test.rb2
-rw-r--r--test/functional/documents_controller_test.rb2
-rw-r--r--test/functional/enumerations_controller_test.rb2
-rw-r--r--test/functional/groups_controller_test.rb2
-rw-r--r--test/functional/issue_categories_controller_test.rb2
-rw-r--r--test/functional/issue_relations_controller_test.rb2
-rw-r--r--test/functional/issues_controller_test.rb55
-rw-r--r--test/functional/journals_controller_test.rb2
-rw-r--r--test/functional/mail_handler_controller_test.rb2
-rw-r--r--test/functional/members_controller_test.rb2
-rw-r--r--test/functional/messages_controller_test.rb2
-rw-r--r--test/functional/my_controller_test.rb2
-rw-r--r--test/functional/news_controller_test.rb2
-rw-r--r--test/functional/projects_controller_test.rb2
-rw-r--r--test/functional/queries_controller_test.rb8
-rw-r--r--test/functional/reports_controller_test.rb2
-rw-r--r--test/functional/repositories_bazaar_controller_test.rb2
-rw-r--r--test/functional/repositories_controller_test.rb2
-rw-r--r--test/functional/repositories_cvs_controller_test.rb2
-rw-r--r--test/functional/repositories_darcs_controller_test.rb2
-rw-r--r--test/functional/repositories_git_controller_test.rb2
-rw-r--r--test/functional/repositories_mercurial_controller_test.rb2
-rw-r--r--test/functional/repositories_subversion_controller_test.rb2
-rw-r--r--test/functional/roles_controller_test.rb2
-rw-r--r--test/functional/search_controller_test.rb2
-rw-r--r--test/functional/settings_controller_test.rb2
-rw-r--r--test/functional/sys_controller_test.rb2
-rw-r--r--test/functional/timelog_controller_test.rb2
-rw-r--r--test/functional/trackers_controller_test.rb2
-rw-r--r--test/functional/users_controller_test.rb2
-rw-r--r--test/functional/versions_controller_test.rb2
-rw-r--r--test/functional/watchers_controller_test.rb2
-rw-r--r--test/functional/welcome_controller_test.rb2
-rw-r--r--test/functional/wiki_controller_test.rb2
-rw-r--r--test/functional/wikis_controller_test.rb2
-rw-r--r--test/functional/workflows_controller_test.rb2
-rw-r--r--test/helper_testcase.rb2
-rw-r--r--test/test_helper.rb4
-rw-r--r--test/unit/activity_test.rb2
-rw-r--r--test/unit/attachment_test.rb2
-rw-r--r--test/unit/auth_source_ldap_test.rb2
-rw-r--r--test/unit/board_test.rb2
-rw-r--r--test/unit/calendar_test.rb2
-rw-r--r--test/unit/changeset_test.rb2
-rw-r--r--test/unit/comment_test.rb2
-rw-r--r--test/unit/custom_field_test.rb2
-rw-r--r--test/unit/custom_value_test.rb2
-rw-r--r--test/unit/default_data_test.rb2
-rw-r--r--test/unit/document_category_test.rb2
-rw-r--r--test/unit/document_test.rb2
-rw-r--r--test/unit/enabled_module_test.rb2
-rw-r--r--test/unit/enumeration_test.rb2
-rw-r--r--test/unit/filesystem_adapter_test.rb2
-rw-r--r--test/unit/git_adapter_test.rb2
-rw-r--r--test/unit/group_test.rb2
-rw-r--r--test/unit/issue_category_test.rb2
-rw-r--r--test/unit/issue_priority_test.rb2
-rw-r--r--test/unit/issue_status_test.rb2
-rw-r--r--test/unit/issue_test.rb2
-rw-r--r--test/unit/journal_test.rb2
-rw-r--r--test/unit/lib/redmine/access_control_test.rb2
-rw-r--r--test/unit/lib/redmine/hook_test.rb2
-rw-r--r--test/unit/lib/redmine/i18n_test.rb2
-rw-r--r--test/unit/lib/redmine/mime_type_test.rb2
-rw-r--r--test/unit/lib/redmine/plugin_test.rb2
-rw-r--r--test/unit/lib/redmine/unified_diff_test.rb2
-rw-r--r--test/unit/mail_handler_test.rb2
-rw-r--r--test/unit/mailer_test.rb16
-rw-r--r--test/unit/member_test.rb2
-rw-r--r--test/unit/mercurial_adapter_test.rb2
-rw-r--r--test/unit/message_test.rb2
-rw-r--r--test/unit/news_test.rb2
-rw-r--r--test/unit/project_test.rb2
-rw-r--r--test/unit/query_test.rb2
-rw-r--r--test/unit/repository_bazaar_test.rb2
-rw-r--r--test/unit/repository_cvs_test.rb2
-rw-r--r--test/unit/repository_darcs_test.rb2
-rw-r--r--test/unit/repository_filesystem_test.rb2
-rw-r--r--test/unit/repository_git_test.rb2
-rw-r--r--test/unit/repository_mercurial_test.rb2
-rw-r--r--test/unit/repository_subversion_test.rb2
-rw-r--r--test/unit/repository_test.rb2
-rw-r--r--test/unit/role_test.rb2
-rw-r--r--test/unit/search_test.rb2
-rw-r--r--test/unit/setting_test.rb2
-rw-r--r--test/unit/subversion_adapter_test.rb2
-rw-r--r--test/unit/time_entry_activity_test.rb2
-rw-r--r--test/unit/time_entry_test.rb2
-rw-r--r--test/unit/token_test.rb2
-rw-r--r--test/unit/tracker_test.rb2
-rw-r--r--test/unit/user_preference_test.rb2
-rw-r--r--test/unit/user_test.rb2
-rw-r--r--test/unit/version_test.rb2
-rw-r--r--test/unit/watcher_test.rb2
-rw-r--r--test/unit/wiki_content_test.rb2
-rw-r--r--test/unit/wiki_page_test.rb2
-rw-r--r--test/unit/wiki_redirect_test.rb2
-rw-r--r--test/unit/wiki_test.rb2
103 files changed, 150 insertions, 133 deletions
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb
index fb23e6bb7..8184fa312 100644
--- a/test/functional/account_controller_test.rb
+++ b/test/functional/account_controller_test.rb
@@ -21,7 +21,7 @@ require 'account_controller'
# Re-raise errors caught by the controller.
class AccountController; def rescue_action(e) raise e end; end
-class AccountControllerTest < Test::Unit::TestCase
+class AccountControllerTest < ActionController::TestCase
fixtures :users, :roles
def setup
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb
index 32965de4c..47091c42f 100644
--- a/test/functional/admin_controller_test.rb
+++ b/test/functional/admin_controller_test.rb
@@ -21,7 +21,7 @@ require 'admin_controller'
# Re-raise errors caught by the controller.
class AdminController; def rescue_action(e) raise e end; end
-class AdminControllerTest < Test::Unit::TestCase
+class AdminControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles
def setup
diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb
index 0232b6a4d..7e221c252 100644
--- a/test/functional/application_controller_test.rb
+++ b/test/functional/application_controller_test.rb
@@ -16,12 +16,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.dirname(__FILE__) + '/../test_helper'
-require 'application'
+require 'application_controller'
# Re-raise errors caught by the controller.
class ApplicationController; def rescue_action(e) raise e end; end
-class ApplicationControllerTest < Test::Unit::TestCase
+class ApplicationControllerTest < ActionController::TestCase
include Redmine::I18n
def setup
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb
index 3a4b89785..bf57349fe 100644
--- a/test/functional/attachments_controller_test.rb
+++ b/test/functional/attachments_controller_test.rb
@@ -22,7 +22,7 @@ require 'attachments_controller'
class AttachmentsController; def rescue_action(e) raise e end; end
-class AttachmentsControllerTest < Test::Unit::TestCase
+class AttachmentsControllerTest < ActionController::TestCase
fixtures :users, :projects, :roles, :members, :member_roles, :enabled_modules, :issues, :trackers, :attachments,
:versions, :wiki_pages, :wikis, :documents
diff --git a/test/functional/boards_controller_test.rb b/test/functional/boards_controller_test.rb
index eb9a50ea5..254ee9385 100644
--- a/test/functional/boards_controller_test.rb
+++ b/test/functional/boards_controller_test.rb
@@ -21,7 +21,7 @@ require 'boards_controller'
# Re-raise errors caught by the controller.
class BoardsController; def rescue_action(e) raise e end; end
-class BoardsControllerTest < Test::Unit::TestCase
+class BoardsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules
def setup
diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb
index 10af23563..5b27446bd 100644
--- a/test/functional/custom_fields_controller_test.rb
+++ b/test/functional/custom_fields_controller_test.rb
@@ -21,7 +21,7 @@ require 'custom_fields_controller'
# Re-raise errors caught by the controller.
class CustomFieldsController; def rescue_action(e) raise e end; end
-class CustomFieldsControllerTest < Test::Unit::TestCase
+class CustomFieldsControllerTest < ActionController::TestCase
fixtures :custom_fields, :trackers, :users
def setup
diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb
index c0fe0957e..11c706596 100644
--- a/test/functional/documents_controller_test.rb
+++ b/test/functional/documents_controller_test.rb
@@ -21,7 +21,7 @@ require 'documents_controller'
# Re-raise errors caught by the controller.
class DocumentsController; def rescue_action(e) raise e end; end
-class DocumentsControllerTest < Test::Unit::TestCase
+class DocumentsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :documents, :enumerations
def setup
diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb
index afbe23aaa..8c66186f1 100644
--- a/test/functional/enumerations_controller_test.rb
+++ b/test/functional/enumerations_controller_test.rb
@@ -21,7 +21,7 @@ require 'enumerations_controller'
# Re-raise errors caught by the controller.
class EnumerationsController; def rescue_action(e) raise e end; end
-class EnumerationsControllerTest < Test::Unit::TestCase
+class EnumerationsControllerTest < ActionController::TestCase
fixtures :enumerations, :issues, :users
def setup
diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb
index ac61db425..91fc42c34 100644
--- a/test/functional/groups_controller_test.rb
+++ b/test/functional/groups_controller_test.rb
@@ -21,7 +21,7 @@ require 'groups_controller'
# Re-raise errors caught by the controller.
class GroupsController; def rescue_action(e) raise e end; end
-class GroupsControllerTest < Test::Unit::TestCase
+class GroupsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles
def setup
diff --git a/test/functional/issue_categories_controller_test.rb b/test/functional/issue_categories_controller_test.rb
index ffb87339d..3d1dd069a 100644
--- a/test/functional/issue_categories_controller_test.rb
+++ b/test/functional/issue_categories_controller_test.rb
@@ -21,7 +21,7 @@ require 'issue_categories_controller'
# Re-raise errors caught by the controller.
class IssueCategoriesController; def rescue_action(e) raise e end; end
-class IssueCategoriesControllerTest < Test::Unit::TestCase
+class IssueCategoriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :enabled_modules, :issue_categories
def setup
diff --git a/test/functional/issue_relations_controller_test.rb b/test/functional/issue_relations_controller_test.rb
index a23f64a96..85661749f 100644
--- a/test/functional/issue_relations_controller_test.rb
+++ b/test/functional/issue_relations_controller_test.rb
@@ -5,7 +5,7 @@ require 'issue_relations_controller'
class IssueRelationsController; def rescue_action(e) raise e end; end
-class IssueRelationsControllerTest < Test::Unit::TestCase
+class IssueRelationsControllerTest < ActionController::TestCase
fixtures :projects,
:users,
:roles,
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 95e75b43b..0d282c127 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -21,7 +21,7 @@ require 'issues_controller'
# Re-raise errors caught by the controller.
class IssuesController; def rescue_action(e) raise e end; end
-class IssuesControllerTest < Test::Unit::TestCase
+class IssuesControllerTest < ActionController::TestCase
fixtures :projects,
:users,
:roles,
@@ -42,7 +42,8 @@ class IssuesControllerTest < Test::Unit::TestCase
:custom_fields_trackers,
:time_entries,
:journals,
- :journal_details
+ :journal_details,
+ :queries
def setup
@controller = IssuesController.new
@@ -452,14 +453,16 @@ class IssuesControllerTest < Test::Unit::TestCase
def test_post_new
@request.session[:user_id] = 2
- post :new, :project_id => 1,
- :issue => {:tracker_id => 3,
- :subject => 'This is the test_new issue',
- :description => 'This is the description',
- :priority_id => 5,
- :estimated_hours => '',
- :custom_field_values => {'2' => 'Value for field 2'}}
- assert_redirected_to :action => 'show'
+ assert_difference 'Issue.count' do
+ post :new, :project_id => 1,
+ :issue => {:tracker_id => 3,
+ :subject => 'This is the test_new issue',
+ :description => 'This is the description',
+ :priority_id => 5,
+ :estimated_hours => '',
+ :custom_field_values => {'2' => 'Value for field 2'}}
+ end
+ assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
issue = Issue.find_by_subject('This is the test_new issue')
assert_not_nil issue
@@ -483,12 +486,14 @@ class IssuesControllerTest < Test::Unit::TestCase
def test_post_new_without_custom_fields_param
@request.session[:user_id] = 2
- post :new, :project_id => 1,
- :issue => {:tracker_id => 1,
- :subject => 'This is the test_new issue',
- :description => 'This is the description',
- :priority_id => 5}
- assert_redirected_to :action => 'show'
+ assert_difference 'Issue.count' do
+ post :new, :project_id => 1,
+ :issue => {:tracker_id => 1,
+ :subject => 'This is the test_new issue',
+ :description => 'This is the description',
+ :priority_id => 5}
+ end
+ assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
end
def test_post_new_with_required_custom_field_and_without_custom_fields_param
@@ -536,14 +541,16 @@ class IssuesControllerTest < Test::Unit::TestCase
def test_post_new_should_send_a_notification
ActionMailer::Base.deliveries.clear
@request.session[:user_id] = 2
- post :new, :project_id => 1,
- :issue => {:tracker_id => 3,
- :subject => 'This is the test_new issue',
- :description => 'This is the description',
- :priority_id => 5,
- :estimated_hours => '',
- :custom_field_values => {'2' => 'Value for field 2'}}
- assert_redirected_to :action => 'show'
+ assert_difference 'Issue.count' do
+ post :new, :project_id => 1,
+ :issue => {:tracker_id => 3,
+ :subject => 'This is the test_new issue',
+ :description => 'This is the description',
+ :priority_id => 5,
+ :estimated_hours => '',
+ :custom_field_values => {'2' => 'Value for field 2'}}
+ end
+ assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
assert_equal 1, ActionMailer::Base.deliveries.size
end
diff --git a/test/functional/journals_controller_test.rb b/test/functional/journals_controller_test.rb
index ae112ab6f..0a11bab3e 100644
--- a/test/functional/journals_controller_test.rb
+++ b/test/functional/journals_controller_test.rb
@@ -21,7 +21,7 @@ require 'journals_controller'
# Re-raise errors caught by the controller.
class JournalsController; def rescue_action(e) raise e end; end
-class JournalsControllerTest < Test::Unit::TestCase
+class JournalsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :issues, :journals, :journal_details, :enabled_modules
def setup
diff --git a/test/functional/mail_handler_controller_test.rb b/test/functional/mail_handler_controller_test.rb
index e99f99a2c..8365f3170 100644
--- a/test/functional/mail_handler_controller_test.rb
+++ b/test/functional/mail_handler_controller_test.rb
@@ -21,7 +21,7 @@ require 'mail_handler_controller'
# Re-raise errors caught by the controller.
class MailHandlerController; def rescue_action(e) raise e end; end
-class MailHandlerControllerTest < Test::Unit::TestCase
+class MailHandlerControllerTest < ActionController::TestCase
fixtures :users, :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :issue_statuses, :trackers, :enumerations
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler'
diff --git a/test/functional/members_controller_test.rb b/test/functional/members_controller_test.rb
index 91f36abec..bc5f92e88 100644
--- a/test/functional/members_controller_test.rb
+++ b/test/functional/members_controller_test.rb
@@ -22,7 +22,7 @@ require 'members_controller'
class MembersController; def rescue_action(e) raise e end; end
-class MembersControllerTest < Test::Unit::TestCase
+class MembersControllerTest < ActionController::TestCase
fixtures :projects, :members, :member_roles, :roles, :users
def setup
diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb
index 70061aca3..2522f0a87 100644
--- a/test/functional/messages_controller_test.rb
+++ b/test/functional/messages_controller_test.rb
@@ -21,7 +21,7 @@ require 'messages_controller'
# Re-raise errors caught by the controller.
class MessagesController; def rescue_action(e) raise e end; end
-class MessagesControllerTest < Test::Unit::TestCase
+class MessagesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules
def setup
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index 997340096..8862466e7 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -21,7 +21,7 @@ require 'my_controller'
# Re-raise errors caught by the controller.
class MyController; def rescue_action(e) raise e end; end
-class MyControllerTest < Test::Unit::TestCase
+class MyControllerTest < ActionController::TestCase
fixtures :users, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields
def setup
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb
index cea35ca4a..427d75b75 100644
--- a/test/functional/news_controller_test.rb
+++ b/test/functional/news_controller_test.rb
@@ -21,7 +21,7 @@ require 'news_controller'
# Re-raise errors caught by the controller.
class NewsController; def rescue_action(e) raise e end; end
-class NewsControllerTest < Test::Unit::TestCase
+class NewsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news, :comments
def setup
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 0560a54b6..81b501ea5 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -21,7 +21,7 @@ require 'projects_controller'
# Re-raise errors caught by the controller.
class ProjectsController; def rescue_action(e) raise e end; end
-class ProjectsControllerTest < Test::Unit::TestCase
+class ProjectsControllerTest < ActionController::TestCase
fixtures :projects, :versions, :users, :roles, :members, :member_roles, :issues, :journals, :journal_details,
:trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages,
:attachments
diff --git a/test/functional/queries_controller_test.rb b/test/functional/queries_controller_test.rb
index 8edde44aa..af2a86e11 100644
--- a/test/functional/queries_controller_test.rb
+++ b/test/functional/queries_controller_test.rb
@@ -21,7 +21,7 @@ require 'queries_controller'
# Re-raise errors caught by the controller.
class QueriesController; def rescue_action(e) raise e end; end
-class QueriesControllerTest < Test::Unit::TestCase
+class QueriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :trackers, :issue_statuses, :issue_categories, :enumerations, :issues, :custom_fields, :custom_values, :queries
def setup
@@ -70,7 +70,7 @@ class QueriesControllerTest < Test::Unit::TestCase
:query => {"name" => "test_new_project_public_query", "is_public" => "1"}
q = Query.find_by_name('test_new_project_public_query')
- assert_redirected_to :controller => 'issues', :action => 'index', :query_id => q
+ assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook', :query_id => q
assert q.is_public?
assert q.has_default_columns?
assert q.valid?
@@ -88,7 +88,7 @@ class QueriesControllerTest < Test::Unit::TestCase
:query => {"name" => "test_new_project_private_query", "is_public" => "1"}
q = Query.find_by_name('test_new_project_private_query')
- assert_redirected_to :controller => 'issues', :action => 'index', :query_id => q
+ assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook', :query_id => q
assert !q.is_public?
assert q.has_default_columns?
assert q.valid?
@@ -104,7 +104,7 @@ class QueriesControllerTest < Test::Unit::TestCase
:query => {"name" => "test_new_global_private_query", "is_public" => "1", "column_names" => ["", "tracker", "subject", "priority", "category"]}
q = Query.find_by_name('test_new_global_private_query')
- assert_redirected_to :controller => 'issues', :action => 'index', :query_id => q
+ assert_redirected_to :controller => 'issues', :action => 'index', :project_id => nil, :query_id => q
assert !q.is_public?
assert !q.has_default_columns?
assert_equal [:tracker, :subject, :priority, :category], q.columns.collect {|c| c.name}
diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb
index 125b175c6..ab33b3035 100644
--- a/test/functional/reports_controller_test.rb
+++ b/test/functional/reports_controller_test.rb
@@ -22,7 +22,7 @@ require 'reports_controller'
class ReportsController; def rescue_action(e) raise e end; end
-class ReportsControllerTest < Test::Unit::TestCase
+class ReportsControllerTest < ActionController::TestCase
fixtures :all
def setup
diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb
index 98aa2369f..18841d54e 100644
--- a/test/functional/repositories_bazaar_controller_test.rb
+++ b/test/functional/repositories_bazaar_controller_test.rb
@@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end
-class RepositoriesBazaarControllerTest < Test::Unit::TestCase
+class RepositoriesBazaarControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path
diff --git a/test/functional/repositories_controller_test.rb b/test/functional/repositories_controller_test.rb
index d51a42976..d786c2e21 100644
--- a/test/functional/repositories_controller_test.rb
+++ b/test/functional/repositories_controller_test.rb
@@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end
-class RepositoriesControllerTest < Test::Unit::TestCase
+class RepositoriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :issues, :issue_statuses, :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
def setup
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb
index c728bf362..f3d4ecfe1 100644
--- a/test/functional/repositories_cvs_controller_test.rb
+++ b/test/functional/repositories_cvs_controller_test.rb
@@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end
-class RepositoriesCvsControllerTest < Test::Unit::TestCase
+class RepositoriesCvsControllerTest < ActionController::TestCase
# No '..' in the repository path
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/cvs_repository'
diff --git a/test/functional/repositories_darcs_controller_test.rb b/test/functional/repositories_darcs_controller_test.rb
index 3f841e9a1..b605ff82b 100644
--- a/test/functional/repositories_darcs_controller_test.rb
+++ b/test/functional/repositories_darcs_controller_test.rb
@@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end
-class RepositoriesDarcsControllerTest < Test::Unit::TestCase
+class RepositoriesDarcsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index 6c2502f51..37c6fb848 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end
-class RepositoriesGitControllerTest < Test::Unit::TestCase
+class RepositoriesGitControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb
index ec2526550..f2639ee92 100644
--- a/test/functional/repositories_mercurial_controller_test.rb
+++ b/test/functional/repositories_mercurial_controller_test.rb
@@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end
-class RepositoriesMercurialControllerTest < Test::Unit::TestCase
+class RepositoriesMercurialControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path
diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb
index fe1b3dbe5..865bae35c 100644
--- a/test/functional/repositories_subversion_controller_test.rb
+++ b/test/functional/repositories_subversion_controller_test.rb
@@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end
-class RepositoriesSubversionControllerTest < Test::Unit::TestCase
+class RepositoriesSubversionControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
:repositories, :issues, :issue_statuses, :changesets, :changes,
:issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
diff --git a/test/functional/roles_controller_test.rb b/test/functional/roles_controller_test.rb
index 61e9bd6df..200408837 100644
--- a/test/functional/roles_controller_test.rb
+++ b/test/functional/roles_controller_test.rb
@@ -21,7 +21,7 @@ require 'roles_controller'
# Re-raise errors caught by the controller.
class RolesController; def rescue_action(e) raise e end; end
-class RolesControllerTest < Test::Unit::TestCase
+class RolesControllerTest < ActionController::TestCase
fixtures :roles, :users, :members, :member_roles, :workflows
def setup
diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb
index 4f79081ae..b062468a6 100644
--- a/test/functional/search_controller_test.rb
+++ b/test/functional/search_controller_test.rb
@@ -4,7 +4,7 @@ require 'search_controller'
# Re-raise errors caught by the controller.
class SearchController; def rescue_action(e) raise e end; end
-class SearchControllerTest < Test::Unit::TestCase
+class SearchControllerTest < ActionController::TestCase
fixtures :projects, :enabled_modules, :roles, :users, :members, :member_roles,
:issues, :trackers, :issue_statuses,
:custom_fields, :custom_values,
diff --git a/test/functional/settings_controller_test.rb b/test/functional/settings_controller_test.rb
index 0e919a741..1e0c48f0e 100644
--- a/test/functional/settings_controller_test.rb
+++ b/test/functional/settings_controller_test.rb
@@ -21,7 +21,7 @@ require 'settings_controller'
# Re-raise errors caught by the controller.
class SettingsController; def rescue_action(e) raise e end; end
-class SettingsControllerTest < Test::Unit::TestCase
+class SettingsControllerTest < ActionController::TestCase
fixtures :users
def setup
diff --git a/test/functional/sys_controller_test.rb b/test/functional/sys_controller_test.rb
index db9dd2aa3..59b1d2af6 100644
--- a/test/functional/sys_controller_test.rb
+++ b/test/functional/sys_controller_test.rb
@@ -21,7 +21,7 @@ require 'sys_controller'
# Re-raise errors caught by the controller.
class SysController; def rescue_action(e) raise e end; end
-class SysControllerTest < Test::Unit::TestCase
+class SysControllerTest < ActionController::TestCase
fixtures :projects, :repositories
def setup
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index df80f5d5a..371fded18 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -21,7 +21,7 @@ require 'timelog_controller'
# Re-raise errors caught by the controller.
class TimelogController; def rescue_action(e) raise e end; end
-class TimelogControllerTest < Test::Unit::TestCase
+class TimelogControllerTest < ActionController::TestCase
fixtures :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :time_entries, :users, :trackers, :enumerations, :issue_statuses, :custom_fields, :custom_values
def setup
diff --git a/test/functional/trackers_controller_test.rb b/test/functional/trackers_controller_test.rb
index e2109ba6f..ec412245a 100644
--- a/test/functional/trackers_controller_test.rb
+++ b/test/functional/trackers_controller_test.rb
@@ -21,7 +21,7 @@ require 'trackers_controller'
# Re-raise errors caught by the controller.
class TrackersController; def rescue_action(e) raise e end; end
-class TrackersControllerTest < Test::Unit::TestCase
+class TrackersControllerTest < ActionController::TestCase
fixtures :trackers, :projects, :projects_trackers, :users, :issues
def setup
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 5f62b1549..df87462a8 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -21,7 +21,7 @@ require 'users_controller'
# Re-raise errors caught by the controller.
class UsersController; def rescue_action(e) raise e end; end
-class UsersControllerTest < Test::Unit::TestCase
+class UsersControllerTest < ActionController::TestCase
include Redmine::I18n
fixtures :users, :projects, :members, :member_roles, :roles
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index 3d212def3..4343b887a 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -21,7 +21,7 @@ require 'versions_controller'
# Re-raise errors caught by the controller.
class VersionsController; def rescue_action(e) raise e end; end
-class VersionsControllerTest < Test::Unit::TestCase
+class VersionsControllerTest < ActionController::TestCase
fixtures :projects, :versions, :issues, :users, :roles, :members, :member_roles, :enabled_modules
def setup
diff --git a/test/functional/watchers_controller_test.rb b/test/functional/watchers_controller_test.rb
index 275599f9b..3b48767b9 100644
--- a/test/functional/watchers_controller_test.rb
+++ b/test/functional/watchers_controller_test.rb
@@ -21,7 +21,7 @@ require 'watchers_controller'
# Re-raise errors caught by the controller.
class WatchersController; def rescue_action(e) raise e end; end
-class WatchersControllerTest < Test::Unit::TestCase
+class WatchersControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
:issues, :trackers, :projects_trackers, :issue_statuses, :enumerations, :watchers
diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb
index 0376fd857..5fef176ab 100644
--- a/test/functional/welcome_controller_test.rb
+++ b/test/functional/welcome_controller_test.rb
@@ -21,7 +21,7 @@ require 'welcome_controller'
# Re-raise errors caught by the controller.
class WelcomeController; def rescue_action(e) raise e end; end
-class WelcomeControllerTest < Test::Unit::TestCase
+class WelcomeControllerTest < ActionController::TestCase
fixtures :projects, :news
def setup
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index 9d104c527..cf247db80 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -21,7 +21,7 @@ require 'wiki_controller'
# Re-raise errors caught by the controller.
class WikiController; def rescue_action(e) raise e end; end
-class WikiControllerTest < Test::Unit::TestCase
+class WikiControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions, :attachments
def setup
diff --git a/test/functional/wikis_controller_test.rb b/test/functional/wikis_controller_test.rb
index 7a5634f1d..dc7df4d95 100644
--- a/test/functional/wikis_controller_test.rb
+++ b/test/functional/wikis_controller_test.rb
@@ -21,7 +21,7 @@ require 'wikis_controller'
# Re-raise errors caught by the controller.
class WikisController; def rescue_action(e) raise e end; end
-class WikisControllerTest < Test::Unit::TestCase
+class WikisControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis
def setup
diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb
index d6078bbb9..19187b7fe 100644
--- a/test/functional/workflows_controller_test.rb
+++ b/test/functional/workflows_controller_test.rb
@@ -21,7 +21,7 @@ require 'workflows_controller'
# Re-raise errors caught by the controller.
class WorkflowsController; def rescue_action(e) raise e end; end
-class WorkflowsControllerTest < Test::Unit::TestCase
+class WorkflowsControllerTest < ActionController::TestCase
fixtures :roles, :trackers, :workflows
def setup
diff --git a/test/helper_testcase.rb b/test/helper_testcase.rb
index aba6784a0..1ce9d8661 100644
--- a/test/helper_testcase.rb
+++ b/test/helper_testcase.rb
@@ -4,7 +4,7 @@ class StubController < ApplicationController
attr_accessor :request, :url
end
-class HelperTestCase < Test::Unit::TestCase
+class HelperTestCase < ActiveSupport::TestCase
# Add other helpers here if you need them
include ActionView::Helpers::ActiveRecordHelper
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 88117e540..fba2987d3 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -21,7 +21,7 @@ require 'test_help'
require File.expand_path(File.dirname(__FILE__) + '/helper_testcase')
require File.join(RAILS_ROOT,'test', 'mocks', 'open_id_authentication_mock.rb')
-class Test::Unit::TestCase
+class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test database remains unchanged so your fixtures don't have to be reloaded
@@ -55,7 +55,7 @@ class Test::Unit::TestCase
end
def test_uploaded_file(name, mime)
- ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + "/files/#{name}", mime)
+ ActionController::TestUploadedFile.new(ActiveSupport::TestCase.fixture_path + "/files/#{name}", mime)
end
# Use a temporary directory for attachment related tests
diff --git a/test/unit/activity_test.rb b/test/unit/activity_test.rb
index 0b1773dd2..86a07e6a5 100644
--- a/test/unit/activity_test.rb
+++ b/test/unit/activity_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class ActivityTest < Test::Unit::TestCase
+class ActivityTest < ActiveSupport::TestCase
fixtures :projects, :versions, :attachments, :users, :roles, :members, :member_roles, :issues, :journals, :journal_details,
:trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb
index ae92991f8..75a7a3c90 100644
--- a/test/unit/attachment_test.rb
+++ b/test/unit/attachment_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class AttachmentTest < Test::Unit::TestCase
+class AttachmentTest < ActiveSupport::TestCase
fixtures :issues, :users
def setup
diff --git a/test/unit/auth_source_ldap_test.rb b/test/unit/auth_source_ldap_test.rb
index 30abd5dd8..d0f7a6edf 100644
--- a/test/unit/auth_source_ldap_test.rb
+++ b/test/unit/auth_source_ldap_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class AuthSourceLdapTest < Test::Unit::TestCase
+class AuthSourceLdapTest < ActiveSupport::TestCase
def setup
end
diff --git a/test/unit/board_test.rb b/test/unit/board_test.rb
index 3ba4b2d97..569c4620a 100644
--- a/test/unit/board_test.rb
+++ b/test/unit/board_test.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../test_helper'
-class BoardTest < Test::Unit::TestCase
+class BoardTest < ActiveSupport::TestCase
fixtures :projects, :boards, :messages
def setup
diff --git a/test/unit/calendar_test.rb b/test/unit/calendar_test.rb
index 98d856921..05e1d0bad 100644
--- a/test/unit/calendar_test.rb
+++ b/test/unit/calendar_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class CalendarTest < Test::Unit::TestCase
+class CalendarTest < ActiveSupport::TestCase
def test_monthly
c = Redmine::Helpers::Calendar.new(Date.today, :fr, :month)
diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb
index 51d8b7452..9af53a3ca 100644
--- a/test/unit/changeset_test.rb
+++ b/test/unit/changeset_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class ChangesetTest < Test::Unit::TestCase
+class ChangesetTest < ActiveSupport::TestCase
fixtures :projects, :repositories, :issues, :issue_statuses, :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :users, :members, :member_roles, :trackers
def setup
diff --git a/test/unit/comment_test.rb b/test/unit/comment_test.rb
index c07ee8273..0a62148c3 100644
--- a/test/unit/comment_test.rb
+++ b/test/unit/comment_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class CommentTest < Test::Unit::TestCase
+class CommentTest < ActiveSupport::TestCase
fixtures :users, :news, :comments
def setup
diff --git a/test/unit/custom_field_test.rb b/test/unit/custom_field_test.rb
index 2f17d99cf..513c6fb2e 100644
--- a/test/unit/custom_field_test.rb
+++ b/test/unit/custom_field_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class CustomFieldTest < Test::Unit::TestCase
+class CustomFieldTest < ActiveSupport::TestCase
fixtures :custom_fields
def test_create
diff --git a/test/unit/custom_value_test.rb b/test/unit/custom_value_test.rb
index 11578ae6b..08492ef58 100644
--- a/test/unit/custom_value_test.rb
+++ b/test/unit/custom_value_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class CustomValueTest < Test::Unit::TestCase
+class CustomValueTest < ActiveSupport::TestCase
fixtures :custom_fields
def test_string_field_validation_with_blank_value
diff --git a/test/unit/default_data_test.rb b/test/unit/default_data_test.rb
index 457f885ee..a63d205c1 100644
--- a/test/unit/default_data_test.rb
+++ b/test/unit/default_data_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class DefaultDataTest < Test::Unit::TestCase
+class DefaultDataTest < ActiveSupport::TestCase
include Redmine::I18n
fixtures :roles
diff --git a/test/unit/document_category_test.rb b/test/unit/document_category_test.rb
index 6fa93a371..8b814432c 100644
--- a/test/unit/document_category_test.rb
+++ b/test/unit/document_category_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class DocumentCategoryTest < Test::Unit::TestCase
+class DocumentCategoryTest < ActiveSupport::TestCase
fixtures :enumerations, :documents
def test_should_be_an_enumeration
diff --git a/test/unit/document_test.rb b/test/unit/document_test.rb
index 1950f8558..02ae94dd0 100644
--- a/test/unit/document_test.rb
+++ b/test/unit/document_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class DocumentTest < Test::Unit::TestCase
+class DocumentTest < ActiveSupport::TestCase
fixtures :projects, :enumerations, :documents
def test_create
diff --git a/test/unit/enabled_module_test.rb b/test/unit/enabled_module_test.rb
index 3daec434f..5e662ebc7 100644
--- a/test/unit/enabled_module_test.rb
+++ b/test/unit/enabled_module_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class EnabledModuleTest < Test::Unit::TestCase
+class EnabledModuleTest < ActiveSupport::TestCase
fixtures :projects, :wikis
def test_enabling_wiki_should_create_a_wiki
diff --git a/test/unit/enumeration_test.rb b/test/unit/enumeration_test.rb
index 14ea5e25c..4dc6e15c3 100644
--- a/test/unit/enumeration_test.rb
+++ b/test/unit/enumeration_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class EnumerationTest < Test::Unit::TestCase
+class EnumerationTest < ActiveSupport::TestCase
fixtures :enumerations, :issues
def setup
diff --git a/test/unit/filesystem_adapter_test.rb b/test/unit/filesystem_adapter_test.rb
index 720d1e92c..26e97bda6 100644
--- a/test/unit/filesystem_adapter_test.rb
+++ b/test/unit/filesystem_adapter_test.rb
@@ -2,7 +2,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class FilesystemAdapterTest < Test::Unit::TestCase
+class FilesystemAdapterTest < ActiveSupport::TestCase
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/filesystem_repository'
diff --git a/test/unit/git_adapter_test.rb b/test/unit/git_adapter_test.rb
index 50bded062..9ab25c154 100644
--- a/test/unit/git_adapter_test.rb
+++ b/test/unit/git_adapter_test.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../test_helper'
-class GitAdapterTest < Test::Unit::TestCase
+class GitAdapterTest < ActiveSupport::TestCase
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/git_repository'
if File.directory?(REPOSITORY_PATH)
diff --git a/test/unit/group_test.rb b/test/unit/group_test.rb
index 79b9d4180..4b26f8f2c 100644
--- a/test/unit/group_test.rb
+++ b/test/unit/group_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class GroupTest < Test::Unit::TestCase
+class GroupTest < ActiveSupport::TestCase
fixtures :all
def test_create
diff --git a/test/unit/issue_category_test.rb b/test/unit/issue_category_test.rb
index a6edb3c7b..ebb9f0f13 100644
--- a/test/unit/issue_category_test.rb
+++ b/test/unit/issue_category_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class IssueCategoryTest < Test::Unit::TestCase
+class IssueCategoryTest < ActiveSupport::TestCase
fixtures :issue_categories, :issues
def setup
diff --git a/test/unit/issue_priority_test.rb b/test/unit/issue_priority_test.rb
index e2da1e82d..6574bf38c 100644
--- a/test/unit/issue_priority_test.rb
+++ b/test/unit/issue_priority_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class IssuePriorityTest < Test::Unit::TestCase
+class IssuePriorityTest < ActiveSupport::TestCase
fixtures :enumerations, :issues
def test_should_be_an_enumeration
diff --git a/test/unit/issue_status_test.rb b/test/unit/issue_status_test.rb
index aebe74cb6..042f30e32 100644
--- a/test/unit/issue_status_test.rb
+++ b/test/unit/issue_status_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class IssueStatusTest < Test::Unit::TestCase
+class IssueStatusTest < ActiveSupport::TestCase
fixtures :issue_statuses, :issues
def test_create
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index a6710edc0..147d31f8c 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class IssueTest < Test::Unit::TestCase
+class IssueTest < ActiveSupport::TestCase
fixtures :projects, :users, :members, :member_roles,
:trackers, :projects_trackers,
:issue_statuses, :issue_categories, :issue_relations, :workflows,
diff --git a/test/unit/journal_test.rb b/test/unit/journal_test.rb
index 147af4aae..87273ad46 100644
--- a/test/unit/journal_test.rb
+++ b/test/unit/journal_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class JournalTest < Test::Unit::TestCase
+class JournalTest < ActiveSupport::TestCase
fixtures :issues, :issue_statuses, :journals, :journal_details
def setup
diff --git a/test/unit/lib/redmine/access_control_test.rb b/test/unit/lib/redmine/access_control_test.rb
index 5dd87d28c..dcc84c19f 100644
--- a/test/unit/lib/redmine/access_control_test.rb
+++ b/test/unit/lib/redmine/access_control_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../../../test_helper'
-class Redmine::AccessControlTest < Test::Unit::TestCase
+class Redmine::AccessControlTest < ActiveSupport::TestCase
def setup
@access_module = Redmine::AccessControl
diff --git a/test/unit/lib/redmine/hook_test.rb b/test/unit/lib/redmine/hook_test.rb
index 9313a36c7..de74f1e57 100644
--- a/test/unit/lib/redmine/hook_test.rb
+++ b/test/unit/lib/redmine/hook_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../../../test_helper'
-class Redmine::Hook::ManagerTest < Test::Unit::TestCase
+class Redmine::Hook::ManagerTest < ActiveSupport::TestCase
fixtures :issues
diff --git a/test/unit/lib/redmine/i18n_test.rb b/test/unit/lib/redmine/i18n_test.rb
index 8b91359a9..35401f1c2 100644
--- a/test/unit/lib/redmine/i18n_test.rb
+++ b/test/unit/lib/redmine/i18n_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../../../test_helper'
-class Redmine::I18nTest < Test::Unit::TestCase
+class Redmine::I18nTest < ActiveSupport::TestCase
include Redmine::I18n
def setup
diff --git a/test/unit/lib/redmine/mime_type_test.rb b/test/unit/lib/redmine/mime_type_test.rb
index 79d086944..2cf151841 100644
--- a/test/unit/lib/redmine/mime_type_test.rb
+++ b/test/unit/lib/redmine/mime_type_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../../../test_helper'
-class Redmine::MimeTypeTest < Test::Unit::TestCase
+class Redmine::MimeTypeTest < ActiveSupport::TestCase
def test_of
to_test = {'test.unk' => nil,
diff --git a/test/unit/lib/redmine/plugin_test.rb b/test/unit/lib/redmine/plugin_test.rb
index e6237c216..234da14ea 100644
--- a/test/unit/lib/redmine/plugin_test.rb
+++ b/test/unit/lib/redmine/plugin_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../../../test_helper'
-class Redmine::PluginTest < Test::Unit::TestCase
+class Redmine::PluginTest < ActiveSupport::TestCase
def setup
@klass = Redmine::Plugin
diff --git a/test/unit/lib/redmine/unified_diff_test.rb b/test/unit/lib/redmine/unified_diff_test.rb
index 5e6ba1aef..5b26cde25 100644
--- a/test/unit/lib/redmine/unified_diff_test.rb
+++ b/test/unit/lib/redmine/unified_diff_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../../../test_helper'
-class Redmine::UnifiedDiffTest < Test::Unit::TestCase
+class Redmine::UnifiedDiffTest < ActiveSupport::TestCase
def setup
end
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 9a9d7d805..9b6c28ba3 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class MailHandlerTest < Test::Unit::TestCase
+class MailHandlerTest < ActiveSupport::TestCase
fixtures :users, :projects,
:enabled_modules,
:roles,
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index b1c39bb5e..5024a845b 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class MailerTest < Test::Unit::TestCase
+class MailerTest < ActiveSupport::TestCase
include Redmine::I18n
fixtures :projects, :issues, :users, :members, :member_roles, :documents, :attachments, :news, :tokens, :journals, :journal_details, :changesets, :trackers, :issue_statuses, :enumerations, :messages, :boards, :repositories
@@ -103,9 +103,19 @@ class MailerTest < Test::Unit::TestCase
journal = Journal.find(2)
Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert !mail.body.include?('<a href="https://mydomain.foo/issues/1">Bug #1: Can\'t print recipes</a>')
+ assert_equal 1, mail.parts.size
+ assert !mail.encoded.include?('href')
end
-
+
+ def test_html_mail
+ Setting.plain_text_mail = 0
+ journal = Journal.find(2)
+ Mailer.deliver_issue_edit(journal)
+ mail = ActionMailer::Base.deliveries.last
+ assert_equal 2, mail.parts.size
+ assert mail.encoded.include?('href')
+ end
+
def test_issue_add_message_id
ActionMailer::Base.deliveries.clear
issue = Issue.find(1)
diff --git a/test/unit/member_test.rb b/test/unit/member_test.rb
index 66f1283ca..87e0086d2 100644
--- a/test/unit/member_test.rb
+++ b/test/unit/member_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class MemberTest < Test::Unit::TestCase
+class MemberTest < ActiveSupport::TestCase
fixtures :users, :projects, :roles, :members, :member_roles
def setup
diff --git a/test/unit/mercurial_adapter_test.rb b/test/unit/mercurial_adapter_test.rb
index a2673ad42..f7b0d3c5b 100644
--- a/test/unit/mercurial_adapter_test.rb
+++ b/test/unit/mercurial_adapter_test.rb
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../test_helper'
begin
require 'mocha'
- class MercurialAdapterTest < Test::Unit::TestCase
+ class MercurialAdapterTest < ActiveSupport::TestCase
TEMPLATES_DIR = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATES_DIR
TEMPLATE_NAME = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_NAME
diff --git a/test/unit/message_test.rb b/test/unit/message_test.rb
index 09857fbc9..5bce8a899 100644
--- a/test/unit/message_test.rb
+++ b/test/unit/message_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class MessageTest < Test::Unit::TestCase
+class MessageTest < ActiveSupport::TestCase
fixtures :projects, :roles, :members, :member_roles, :boards, :messages, :users, :watchers
def setup
diff --git a/test/unit/news_test.rb b/test/unit/news_test.rb
index a4fc89e90..e9d3880e5 100644
--- a/test/unit/news_test.rb
+++ b/test/unit/news_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class NewsTest < Test::Unit::TestCase
+class NewsTest < ActiveSupport::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news
def valid_news
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 13c63a054..c40475e4c 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class ProjectTest < Test::Unit::TestCase
+class ProjectTest < ActiveSupport::TestCase
fixtures :projects, :enabled_modules,
:issues, :issue_statuses, :journals, :journal_details,
:users, :members, :member_roles, :roles, :projects_trackers, :trackers, :boards,
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index 73efa426f..f1f9397c6 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class QueryTest < Test::Unit::TestCase
+class QueryTest < ActiveSupport::TestCase
fixtures :projects, :enabled_modules, :users, :members, :member_roles, :roles, :trackers, :issue_statuses, :issue_categories, :enumerations, :issues, :watchers, :custom_fields, :custom_values, :versions, :queries
def test_custom_fields_for_all_projects_should_be_available_in_global_queries
diff --git a/test/unit/repository_bazaar_test.rb b/test/unit/repository_bazaar_test.rb
index b7a3cf98e..c29e04ede 100644
--- a/test/unit/repository_bazaar_test.rb
+++ b/test/unit/repository_bazaar_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RepositoryBazaarTest < Test::Unit::TestCase
+class RepositoryBazaarTest < ActiveSupport::TestCase
fixtures :projects
# No '..' in the repository path
diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb
index 47c407037..d240a6efd 100644
--- a/test/unit/repository_cvs_test.rb
+++ b/test/unit/repository_cvs_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'pp'
-class RepositoryCvsTest < Test::Unit::TestCase
+class RepositoryCvsTest < ActiveSupport::TestCase
fixtures :projects
# No '..' in the repository path
diff --git a/test/unit/repository_darcs_test.rb b/test/unit/repository_darcs_test.rb
index 0c8c9a143..b9ad95db6 100644
--- a/test/unit/repository_darcs_test.rb
+++ b/test/unit/repository_darcs_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RepositoryDarcsTest < Test::Unit::TestCase
+class RepositoryDarcsTest < ActiveSupport::TestCase
fixtures :projects
# No '..' in the repository path
diff --git a/test/unit/repository_filesystem_test.rb b/test/unit/repository_filesystem_test.rb
index 6b643f96f..7688dd4ee 100644
--- a/test/unit/repository_filesystem_test.rb
+++ b/test/unit/repository_filesystem_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RepositoryFilesystemTest < Test::Unit::TestCase
+class RepositoryFilesystemTest < ActiveSupport::TestCase
fixtures :projects
# No '..' in the repository path
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb
index 382774305..5ebbb00c1 100644
--- a/test/unit/repository_git_test.rb
+++ b/test/unit/repository_git_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RepositoryGitTest < Test::Unit::TestCase
+class RepositoryGitTest < ActiveSupport::TestCase
fixtures :projects
# No '..' in the repository path
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb
index 0f993ac16..6ce3d5fa0 100644
--- a/test/unit/repository_mercurial_test.rb
+++ b/test/unit/repository_mercurial_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RepositoryMercurialTest < Test::Unit::TestCase
+class RepositoryMercurialTest < ActiveSupport::TestCase
fixtures :projects
# No '..' in the repository path
diff --git a/test/unit/repository_subversion_test.rb b/test/unit/repository_subversion_test.rb
index b0eb88c01..17a0a42b0 100644
--- a/test/unit/repository_subversion_test.rb
+++ b/test/unit/repository_subversion_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RepositorySubversionTest < Test::Unit::TestCase
+class RepositorySubversionTest < ActiveSupport::TestCase
fixtures :projects
# No '..' in the repository path for svn
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index 497eeabfd..cc356ec1d 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RepositoryTest < Test::Unit::TestCase
+class RepositoryTest < ActiveSupport::TestCase
fixtures :projects,
:trackers,
:projects_trackers,
diff --git a/test/unit/role_test.rb b/test/unit/role_test.rb
index cab668c50..1e76dd887 100644
--- a/test/unit/role_test.rb
+++ b/test/unit/role_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class RoleTest < Test::Unit::TestCase
+class RoleTest < ActiveSupport::TestCase
fixtures :roles, :workflows
def test_copy_workflows
diff --git a/test/unit/search_test.rb b/test/unit/search_test.rb
index 46d769451..71ed7ad08 100644
--- a/test/unit/search_test.rb
+++ b/test/unit/search_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class SearchTest < Test::Unit::TestCase
+class SearchTest < ActiveSupport::TestCase
fixtures :users,
:members,
:member_roles,
diff --git a/test/unit/setting_test.rb b/test/unit/setting_test.rb
index 34d07c193..25ec41701 100644
--- a/test/unit/setting_test.rb
+++ b/test/unit/setting_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class SettingTest < Test::Unit::TestCase
+class SettingTest < ActiveSupport::TestCase
def test_read_default
assert_equal "Redmine", Setting.app_title
diff --git a/test/unit/subversion_adapter_test.rb b/test/unit/subversion_adapter_test.rb
index 9f208839a..ddef52df2 100644
--- a/test/unit/subversion_adapter_test.rb
+++ b/test/unit/subversion_adapter_test.rb
@@ -19,7 +19,7 @@ require 'mkmf'
require File.dirname(__FILE__) + '/../test_helper'
-class SubversionAdapterTest < Test::Unit::TestCase
+class SubversionAdapterTest < ActiveSupport::TestCase
if find_executable0('svn')
def test_client_version
diff --git a/test/unit/time_entry_activity_test.rb b/test/unit/time_entry_activity_test.rb
index f99c8ab4e..9422a91ab 100644
--- a/test/unit/time_entry_activity_test.rb
+++ b/test/unit/time_entry_activity_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class TimeEntryActivityTest < Test::Unit::TestCase
+class TimeEntryActivityTest < ActiveSupport::TestCase
fixtures :enumerations, :time_entries
def test_should_be_an_enumeration
diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb
index dd54fd1b2..7ac1c02a3 100644
--- a/test/unit/time_entry_test.rb
+++ b/test/unit/time_entry_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class TimeEntryTest < Test::Unit::TestCase
+class TimeEntryTest < ActiveSupport::TestCase
fixtures :issues, :projects, :users, :time_entries
def test_hours_format
diff --git a/test/unit/token_test.rb b/test/unit/token_test.rb
index 64ac85a39..42791e6a7 100644
--- a/test/unit/token_test.rb
+++ b/test/unit/token_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class TokenTest < Test::Unit::TestCase
+class TokenTest < ActiveSupport::TestCase
fixtures :tokens
def test_create
diff --git a/test/unit/tracker_test.rb b/test/unit/tracker_test.rb
index 6dab8890c..efc2aa7ed 100644
--- a/test/unit/tracker_test.rb
+++ b/test/unit/tracker_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class TrackerTest < Test::Unit::TestCase
+class TrackerTest < ActiveSupport::TestCase
fixtures :trackers, :workflows
def test_copy_workflows
diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb
index cf6787b17..19dc63ff8 100644
--- a/test/unit/user_preference_test.rb
+++ b/test/unit/user_preference_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class UserPreferenceTest < Test::Unit::TestCase
+class UserPreferenceTest < ActiveSupport::TestCase
fixtures :users, :user_preferences
def test_create
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 7080c0b5b..e685f53b6 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class UserTest < Test::Unit::TestCase
+class UserTest < ActiveSupport::TestCase
fixtures :users, :members, :projects, :roles, :member_roles
def setup
diff --git a/test/unit/version_test.rb b/test/unit/version_test.rb
index 6c5297fc4..7df857927 100644
--- a/test/unit/version_test.rb
+++ b/test/unit/version_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class VersionTest < Test::Unit::TestCase
+class VersionTest < ActiveSupport::TestCase
fixtures :projects, :users, :issues, :issue_statuses, :trackers, :enumerations, :versions
def setup
diff --git a/test/unit/watcher_test.rb b/test/unit/watcher_test.rb
index 9566e6a7c..f49365edf 100644
--- a/test/unit/watcher_test.rb
+++ b/test/unit/watcher_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class WatcherTest < Test::Unit::TestCase
+class WatcherTest < ActiveSupport::TestCase
fixtures :issues, :users
def setup
diff --git a/test/unit/wiki_content_test.rb b/test/unit/wiki_content_test.rb
index f3f8bc041..372121bda 100644
--- a/test/unit/wiki_content_test.rb
+++ b/test/unit/wiki_content_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class WikiContentTest < Test::Unit::TestCase
+class WikiContentTest < ActiveSupport::TestCase
fixtures :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions, :users
def setup
diff --git a/test/unit/wiki_page_test.rb b/test/unit/wiki_page_test.rb
index df41a4a0a..1837edb18 100644
--- a/test/unit/wiki_page_test.rb
+++ b/test/unit/wiki_page_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class WikiPageTest < Test::Unit::TestCase
+class WikiPageTest < ActiveSupport::TestCase
fixtures :projects, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
def setup
diff --git a/test/unit/wiki_redirect_test.rb b/test/unit/wiki_redirect_test.rb
index 12f6b7d89..7e80638b2 100644
--- a/test/unit/wiki_redirect_test.rb
+++ b/test/unit/wiki_redirect_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class WikiRedirectTest < Test::Unit::TestCase
+class WikiRedirectTest < ActiveSupport::TestCase
fixtures :projects, :wikis
def setup
diff --git a/test/unit/wiki_test.rb b/test/unit/wiki_test.rb
index 23d4f442c..fd8a375e1 100644
--- a/test/unit/wiki_test.rb
+++ b/test/unit/wiki_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class WikiTest < Test::Unit::TestCase
+class WikiTest < ActiveSupport::TestCase
fixtures :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
def test_create