summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/issues_controller_test.rb4
-rw-r--r--test/functional/issues_controller_transaction_test.rb2
-rw-r--r--test/functional/project_enumerations_controller_test.rb2
-rw-r--r--test/functional/repositories_bazaar_controller_test.rb3
-rw-r--r--test/functional/repositories_controller_test.rb3
-rw-r--r--test/functional/repositories_cvs_controller_test.rb3
-rw-r--r--test/functional/repositories_darcs_controller_test.rb3
-rw-r--r--test/functional/repositories_filesystem_controller_test.rb3
-rw-r--r--test/functional/repositories_git_controller_test.rb3
-rw-r--r--test/functional/repositories_mercurial_controller_test.rb3
-rw-r--r--test/functional/repositories_subversion_controller_test.rb3
-rw-r--r--test/functional/users_controller_test.rb6
-rw-r--r--test/functional/welcome_controller_test.rb7
13 files changed, 24 insertions, 21 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 02cdf85e3..34d353263 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -6426,7 +6426,7 @@ class IssuesControllerTest < Redmine::ControllerTest
@request.session[:user_id] = 1
with_settings :gravatar_enabled => '1' do
- get :show, :id => issue.id
+ get :show, :params => {:id => issue.id}
assert_select 'div.gravatar-with-child' do
assert_select 'img.gravatar', 1
end
@@ -6440,7 +6440,7 @@ class IssuesControllerTest < Redmine::ControllerTest
@request.session[:user_id] = 1
with_settings :gravatar_enabled => '1' do
- get :show, :id => issue.id
+ get :show, :params => {:id => issue.id}
assert_select 'div.gravatar-with-child' do
assert_select 'img.gravatar', 2
assert_select 'img.gravatar-child', 1
diff --git a/test/functional/issues_controller_transaction_test.rb b/test/functional/issues_controller_transaction_test.rb
index 67c9d0f78..28ac868b3 100644
--- a/test/functional/issues_controller_transaction_test.rb
+++ b/test/functional/issues_controller_transaction_test.rb
@@ -44,7 +44,7 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest
:journal_details,
:queries
- self.use_transactional_fixtures = false
+ self.use_transactional_tests = false
def setup
User.current = nil
diff --git a/test/functional/project_enumerations_controller_test.rb b/test/functional/project_enumerations_controller_test.rb
index f98d85965..2d87b13a7 100644
--- a/test/functional/project_enumerations_controller_test.rb
+++ b/test/functional/project_enumerations_controller_test.rb
@@ -29,7 +29,7 @@ class ProjectEnumerationsControllerTest < Redmine::ControllerTest
:custom_fields_trackers, :custom_values,
:time_entries
- self.use_transactional_fixtures = false
+ self.use_transactional_tests = false
def setup
@request.session[:user_id] = nil
diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb
index ebfc35fd8..ee9021abd 100644
--- a/test/functional/repositories_bazaar_controller_test.rb
+++ b/test/functional/repositories_bazaar_controller_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesBazaarControllerTest < Redmine::ControllerTest
+class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
@@ -29,6 +29,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
CHAR_1_UTF8_HEX = "\xc3\x9c".dup.force_encoding('UTF-8')
def setup
+ super
User.current = nil
@project = Project.find(PRJ_ID)
@repository = Repository::Bazaar.create(
diff --git a/test/functional/repositories_controller_test.rb b/test/functional/repositories_controller_test.rb
index d51efc5be..e76a2f8c4 100644
--- a/test/functional/repositories_controller_test.rb
+++ b/test/functional/repositories_controller_test.rb
@@ -17,12 +17,13 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesControllerTest < Redmine::ControllerTest
+class RepositoriesControllerTest < Redmine::RepositoryControllerTest
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :enabled_modules,
:repositories, :issues, :issue_statuses, :changesets, :changes,
:issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
def setup
+ super
User.current = nil
end
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb
index b2429e441..c9f26719a 100644
--- a/test/functional/repositories_cvs_controller_test.rb
+++ b/test/functional/repositories_cvs_controller_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesCvsControllerTest < Redmine::ControllerTest
+class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
@@ -31,6 +31,7 @@ class RepositoriesCvsControllerTest < Redmine::ControllerTest
NUM_REV = 7
def setup
+ super
Setting.default_language = 'en'
User.current = nil
diff --git a/test/functional/repositories_darcs_controller_test.rb b/test/functional/repositories_darcs_controller_test.rb
index dc2800f85..7b71da4dc 100644
--- a/test/functional/repositories_darcs_controller_test.rb
+++ b/test/functional/repositories_darcs_controller_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesDarcsControllerTest < Redmine::ControllerTest
+class RepositoriesDarcsControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
@@ -28,6 +28,7 @@ class RepositoriesDarcsControllerTest < Redmine::ControllerTest
NUM_REV = 6
def setup
+ super
User.current = nil
@project = Project.find(PRJ_ID)
@repository = Repository::Darcs.create(
diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb
index 8cd12be20..1dd133c58 100644
--- a/test/functional/repositories_filesystem_controller_test.rb
+++ b/test/functional/repositories_filesystem_controller_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesFilesystemControllerTest < Redmine::ControllerTest
+class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
@@ -27,6 +27,7 @@ class RepositoriesFilesystemControllerTest < Redmine::ControllerTest
PRJ_ID = 3
def setup
+ super
@ruby19_non_utf8_pass = Encoding.default_external.to_s != 'UTF-8'
User.current = nil
Setting.enabled_scm << 'Filesystem' unless Setting.enabled_scm.include?('Filesystem')
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index c7cd7bce2..f1261fa5c 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesGitControllerTest < Redmine::ControllerTest
+class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
@@ -39,6 +39,7 @@ class RepositoriesGitControllerTest < Redmine::ControllerTest
JRUBY_SKIP_STR = "TODO: This test fails in JRuby"
def setup
+ super
@ruby19_non_utf8_pass = Encoding.default_external.to_s != 'UTF-8'
User.current = nil
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb
index aab018d60..7b7e98a14 100644
--- a/test/functional/repositories_mercurial_controller_test.rb
+++ b/test/functional/repositories_mercurial_controller_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesMercurialControllerTest < Redmine::ControllerTest
+class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
@@ -31,6 +31,7 @@ class RepositoriesMercurialControllerTest < Redmine::ControllerTest
ruby19_non_utf8_pass = Encoding.default_external.to_s != 'UTF-8'
def setup
+ super
User.current = nil
@project = Project.find(PRJ_ID)
@repository = Repository::Mercurial.create(
diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb
index ef8fcb777..f8f4b8f9d 100644
--- a/test/functional/repositories_subversion_controller_test.rb
+++ b/test/functional/repositories_subversion_controller_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../test_helper', __FILE__)
-class RepositoriesSubversionControllerTest < Redmine::ControllerTest
+class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :enabled_modules,
@@ -28,6 +28,7 @@ class RepositoriesSubversionControllerTest < Redmine::ControllerTest
NUM_REV = 11
def setup
+ super
Setting.default_language = 'en'
User.current = nil
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index f5eb79a3f..42dae0f50 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -259,7 +259,7 @@ class UsersControllerTest < Redmine::ControllerTest
def test_create_with_failure
assert_no_difference 'User.count' do
- post :create, :params => {:user => {}}
+ post :create, :params => {:user => {:login => 'foo'}}
end
assert_response :success
assert_select_error /Email cannot be blank/
@@ -268,7 +268,9 @@ class UsersControllerTest < Redmine::ControllerTest
def test_create_with_failure_sould_preserve_preference
assert_no_difference 'User.count' do
post :create, :params => {
- :user => {},
+ :user => {
+ :login => 'foo'
+ },
:pref => {
'no_self_notified' => '1',
'hide_mail' => '1',
diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb
index 710eb9ace..38533edac 100644
--- a/test/functional/welcome_controller_test.rb
+++ b/test/functional/welcome_controller_test.rb
@@ -77,13 +77,6 @@ class WelcomeControllerTest < Redmine::ControllerTest
end
end
- def test_robots
- get :robots
- assert_response :success
- assert_equal 'text/plain', @response.content_type
- assert @response.body.match(%r{^Disallow: /projects/ecookbook/issues\r?$})
- end
-
def test_warn_on_leaving_unsaved_turn_on
user = User.find(2)
user.pref.warn_on_leaving_unsaved = '1'