summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/api_test/authentication_test.rb8
-rw-r--r--test/integration/api_test/custom_fields_test.rb2
-rw-r--r--test/integration/api_test/news_test.rb2
-rw-r--r--test/integration/issues_test.rb2
-rw-r--r--test/integration/repositories_git_test.rb1
5 files changed, 11 insertions, 4 deletions
diff --git a/test/integration/api_test/authentication_test.rb b/test/integration/api_test/authentication_test.rb
index 23641b53a..4145fb969 100644
--- a/test/integration/api_test/authentication_test.rb
+++ b/test/integration/api_test/authentication_test.rb
@@ -127,20 +127,23 @@ class Redmine::ApiTest::AuthenticationTest < Redmine::ApiTest::Base
assert_response :unauthorized
end
+ # TODO: check why this test does not use the API endpoint
def test_api_should_accept_switch_user_header_for_admin_user
user = User.find(1)
su = User.find(4)
get '/users/current', :headers => {'X-Redmine-API-Key' => user.api_key, 'X-Redmine-Switch-User' => su.login}
assert_response :success
- assert_select 'h2', :text => su.name
+ assert_select 'h2', :text => "#{su.initials} #{su.name}"
end
+ # TODO: check why this test does not use the API endpoint
def test_api_should_respond_with_412_when_trying_to_switch_to_a_invalid_user
get '/users/current', :headers => {'X-Redmine-API-Key' => User.find(1).api_key, 'X-Redmine-Switch-User' => 'foobar'}
assert_response :precondition_failed
end
+ # TODO: check why this test does not use the API endpoint
def test_api_should_respond_with_412_when_trying_to_switch_to_a_locked_user
user = User.find(5)
assert user.locked?
@@ -149,12 +152,13 @@ class Redmine::ApiTest::AuthenticationTest < Redmine::ApiTest::Base
assert_response :precondition_failed
end
+ # TODO: check why this test does not use the API endpoint
def test_api_should_not_accept_switch_user_header_for_non_admin_user
user = User.find(2)
su = User.find(4)
get '/users/current', :headers => {'X-Redmine-API-Key' => user.api_key, 'X-Redmine-Switch-User' => su.login}
assert_response :success
- assert_select 'h2', :text => user.name
+ assert_select 'h2', :text => "#{user.initials} #{user.name}"
end
end
diff --git a/test/integration/api_test/custom_fields_test.rb b/test/integration/api_test/custom_fields_test.rb
index 0df56e59a..4fb06636e 100644
--- a/test/integration/api_test/custom_fields_test.rb
+++ b/test/integration/api_test/custom_fields_test.rb
@@ -37,6 +37,8 @@ class Redmine::ApiTest::CustomFieldsTest < Redmine::ApiTest::Base
end
assert_select 'trackers[type=array]'
assert_select 'roles[type=array]'
+ assert_select 'visible', :text => 'true'
+ assert_select 'editable', :text => 'true'
end
end
end
diff --git a/test/integration/api_test/news_test.rb b/test/integration/api_test/news_test.rb
index bd9f2bb6d..399b2b347 100644
--- a/test/integration/api_test/news_test.rb
+++ b/test/integration/api_test/news_test.rb
@@ -62,7 +62,7 @@ class Redmine::ApiTest::NewsTest < Redmine::ApiTest::Base
assert_select "author[id=2][name=\"John Smith\"]"
assert_select 'title', 'eCookbook first release !'
assert_select 'summary', 'First version was released...'
- assert_select 'description', "eCookbook 1.0 has been released.\n\nVisit http://ecookbook.somenet.foo/"
+ assert_select 'description', 'eCookbook 1.0 has been released. Visit http://ecookbook.somenet.foo/'
assert_select 'created_on', News.find(1).created_on.iso8601
end
end
diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb
index ac8d432f1..d0763091e 100644
--- a/test/integration/issues_test.rb
+++ b/test/integration/issues_test.rb
@@ -355,7 +355,7 @@ class IssuesTest < Redmine::IntegrationTest
end
# Issue view
follow_redirect!
- assert_select 'ul.details li', :text => "Tester changed from #{tester} to #{new_tester}"
+ assert_select 'ul.journal-details li', :text => "Tester changed from #{tester} to #{new_tester}"
end
end
diff --git a/test/integration/repositories_git_test.rb b/test/integration/repositories_git_test.rb
index 20d643449..793b49458 100644
--- a/test/integration/repositories_git_test.rb
+++ b/test/integration/repositories_git_test.rb
@@ -35,6 +35,7 @@ class RepositoriesGitTest < Redmine::IntegrationTest
:path_encoding => 'ISO-8859-1'
)
assert @repository
+ skip "SCM command is unavailable" unless @repository.class.scm_available
end
if File.directory?(REPOSITORY_PATH)