diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-21 15:05:18 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-21 15:05:18 +0000 |
commit | 7296b569a3de2143d634f731b2ce1f18fbf08b0a (patch) | |
tree | 9434ae922a2ed983635817ebdc0841bec79b9664 | |
parent | 7ac90722707d460934cba31452c138b614cfa400 (diff) | |
download | redmine-7296b569a3de2143d634f731b2ce1f18fbf08b0a.tar.gz redmine-7296b569a3de2143d634f731b2ce1f18fbf08b0a.zip |
Leading slash required with Rails 4.2.
git-svn-id: http://svn.redmine.org/redmine/trunk@13783 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/integration/account_test.rb | 26 | ||||
-rw-r--r-- | test/integration/admin_test.rb | 2 | ||||
-rw-r--r-- | test/integration/application_test.rb | 12 | ||||
-rw-r--r-- | test/integration/issues_test.rb | 10 | ||||
-rw-r--r-- | test/integration/lib/redmine/menu_manager_test.rb | 4 | ||||
-rw-r--r-- | test/integration/projects_test.rb | 12 |
6 files changed, 33 insertions, 33 deletions
diff --git a/test/integration/account_test.rb b/test/integration/account_test.rb index ca6516b9d..e8ccf3fe0 100644 --- a/test/integration/account_test.rb +++ b/test/integration/account_test.rb @@ -21,11 +21,11 @@ class AccountTest < Redmine::IntegrationTest fixtures :users, :roles def test_login - get "my/page" + get "/my/page" assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fmy%2Fpage" log_user('jsmith', 'jsmith') - get "my/account" + get "/my/account" assert_response :success assert_template "my/account" end @@ -91,12 +91,12 @@ class AccountTest < Redmine::IntegrationTest def test_lost_password Token.delete_all - get "account/lost_password" + get "/account/lost_password" assert_response :success assert_template "account/lost_password" assert_select 'input[name=mail]' - post "account/lost_password", :mail => 'jSmith@somenet.foo' + post "/account/lost_password", :mail => 'jSmith@somenet.foo' assert_redirected_to "/login" token = Token.first @@ -104,14 +104,14 @@ class AccountTest < Redmine::IntegrationTest assert_equal 'jsmith@somenet.foo', token.user.mail assert !token.expired? - get "account/lost_password", :token => token.value + get "/account/lost_password", :token => token.value assert_response :success assert_template "account/password_recovery" assert_select 'input[type=hidden][name=token][value=?]', token.value assert_select 'input[name=new_password]' assert_select 'input[name=new_password_confirmation]' - post "account/lost_password", + post "/account/lost_password", :token => token.value, :new_password => 'newpass123', :new_password_confirmation => 'newpass123' assert_redirected_to "/login" @@ -153,11 +153,11 @@ class AccountTest < Redmine::IntegrationTest def test_register_with_automatic_activation Setting.self_registration = '3' - get 'account/register' + get '/account/register' assert_response :success assert_template 'account/register' - post 'account/register', + post '/account/register', :user => {:login => "newuser", :language => "en", :firstname => "New", :lastname => "User", :mail => "newuser@foo.bar", :password => "newpass123", :password_confirmation => "newpass123"} @@ -175,7 +175,7 @@ class AccountTest < Redmine::IntegrationTest def test_register_with_manual_activation Setting.self_registration = '2' - post 'account/register', + post '/account/register', :user => {:login => "newuser", :language => "en", :firstname => "New", :lastname => "User", :mail => "newuser@foo.bar", :password => "newpass123", :password_confirmation => "newpass123"} @@ -187,7 +187,7 @@ class AccountTest < Redmine::IntegrationTest Setting.self_registration = '1' Token.delete_all - post 'account/register', + post '/account/register', :user => {:login => "newuser", :language => "en", :firstname => "New", :lastname => "User", :mail => "newuser@foo.bar", :password => "newpass123", :password_confirmation => "newpass123"} @@ -199,7 +199,7 @@ class AccountTest < Redmine::IntegrationTest assert_equal 'newuser@foo.bar', token.user.mail assert !token.expired? - get 'account/activate', :token => token.value + get '/account/activate', :token => token.value assert_redirected_to '/login' log_user('newuser', 'newpass123') end @@ -234,7 +234,7 @@ class AccountTest < Redmine::IntegrationTest assert_select 'input[name=?]', 'user[login]', 0 assert_select 'input[name=?]', 'user[password]', 0 - post 'account/register', + post '/account/register', :user => {:firstname => 'Foo', :lastname => 'Smith', :mail => 'foo@bar.com'} assert_redirected_to '/my/account' @@ -251,7 +251,7 @@ class AccountTest < Redmine::IntegrationTest # register a new account assert_difference 'User.count' do assert_difference 'Token.count' do - post 'account/register', + post '/account/register', :user => {:login => "newuser", :language => "en", :firstname => "New", :lastname => "User", :mail => "newuser@foo.bar", :password => "newpass123", :password_confirmation => "newpass123"} diff --git a/test/integration/admin_test.rb b/test/integration/admin_test.rb index c3334f501..a4c9afb4b 100644 --- a/test/integration/admin_test.rb +++ b/test/integration/admin_test.rb @@ -45,7 +45,7 @@ class AdminTest < Redmine::IntegrationTest assert_kind_of User, logged_user assert_equal "Paul", logged_user.firstname - put "users/#{user.id}", :id => user.id, :user => { :status => User::STATUS_LOCKED } + put "/users/#{user.id}", :id => user.id, :user => { :status => User::STATUS_LOCKED } assert_redirected_to "/users/#{ user.id }/edit" locked_user = User.try_to_login("psmith", "psmith09") assert_equal nil, locked_user diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb index 5b8368732..f7213a3ab 100644 --- a/test/integration/application_test.rb +++ b/test/integration/application_test.rb @@ -32,21 +32,21 @@ class ApplicationTest < Redmine::IntegrationTest Setting.default_language = 'en' # a french user - get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' + get '/projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' assert_response :success assert_select 'h2', :text => 'Projets' assert_equal :fr, current_language assert_select "html[lang=?]", "fr" # then an italien user - get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3' + get '/projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3' assert_response :success assert_select 'h2', :text => 'Progetti' assert_equal :it, current_language assert_select "html[lang=?]", "it" # not a supported language: default language should be used - get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'zz' + get '/projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'zz' assert_response :success assert_select 'h2', :text => 'Projects' assert_select "html[lang=?]", "en" @@ -54,11 +54,11 @@ class ApplicationTest < Redmine::IntegrationTest def test_token_based_access_should_not_start_session # issue of a private project - get 'issues/4.atom' + get '/issues/4.atom' assert_response 302 rss_key = User.find(2).rss_key - get "issues/4.atom?key=#{rss_key}" + get "/issues/4.atom?key=#{rss_key}" assert_response 200 assert_nil session[:user_id] end @@ -80,7 +80,7 @@ class ApplicationTest < Redmine::IntegrationTest def test_localization_should_be_set_correctly_on_invalid_token ActionController::Base.allow_forgery_protection = true Setting.default_language = 'en' - post 'issues', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' + post '/issues', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' assert_response 422 assert_equal :fr, current_language assert_select "html[lang=?]", "fr" diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb index 201105ceb..8125bb4c0 100644 --- a/test/integration/issues_test.rb +++ b/test/integration/issues_test.rb @@ -36,11 +36,11 @@ class IssuesTest < Redmine::IntegrationTest # create an issue def test_add_issue log_user('jsmith', 'jsmith') - get 'projects/1/issues/new', :tracker_id => '1' + get '/projects/1/issues/new', :tracker_id => '1' assert_response :success assert_template 'issues/new' - post 'projects/1/issues', :tracker_id => "1", + post '/projects/1/issues', :tracker_id => "1", :issue => { :start_date => "2006-12-26", :priority_id => "4", :subject => "new test issue", @@ -69,7 +69,7 @@ class IssuesTest < Redmine::IntegrationTest Role.anonymous.remove_permission! :add_issues assert_no_difference 'Issue.count' do - post 'projects/1/issues', :tracker_id => "1", :issue => {:subject => "new test issue"} + post '/projects/1/issues', :tracker_id => "1", :issue => {:subject => "new test issue"} end assert_response 302 end @@ -79,7 +79,7 @@ class IssuesTest < Redmine::IntegrationTest Member.create!(:project_id => 1, :principal => Group.anonymous, :role_ids => [3]) assert_difference 'Issue.count' do - post 'projects/1/issues', :tracker_id => "1", :issue => {:subject => "new test issue"} + post '/projects/1/issues', :tracker_id => "1", :issue => {:subject => "new test issue"} end assert_response 302 issue = Issue.order("id DESC").first @@ -91,7 +91,7 @@ class IssuesTest < Redmine::IntegrationTest log_user('jsmith', 'jsmith') set_tmp_attachments_directory - put 'issues/1', + put '/issues/1', :notes => 'Some notes', :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'This is an attachment'}} assert_redirected_to "/issues/1" diff --git a/test/integration/lib/redmine/menu_manager_test.rb b/test/integration/lib/redmine/menu_manager_test.rb index 531af524a..39b4ba9eb 100644 --- a/test/integration/lib/redmine/menu_manager_test.rb +++ b/test/integration/lib/redmine/menu_manager_test.rb @@ -29,7 +29,7 @@ class MenuManagerTest < Redmine::IntegrationTest :enabled_modules def test_project_menu_with_specific_locale - get 'projects/ecookbook/issues', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' + get '/projects/ecookbook/issues', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' assert_select 'div#main-menu' do assert_select 'li a.activity[href=?]', '/projects/ecookbook/activity', :text => ll('fr', :label_activity) @@ -46,7 +46,7 @@ class MenuManagerTest < Redmine::IntegrationTest menu.push :hello, { :controller => 'projects', :action => 'show' }, :caption => Proc.new {|p| p.name.upcase }, :after => :bar end - get 'projects/ecookbook' + get '/projects/ecookbook' assert_select 'div#main-menu ul' do assert_select 'li:last-child a.foo[href=?]', '/projects/ecookbook', :text => 'Foo' diff --git a/test/integration/projects_test.rb b/test/integration/projects_test.rb index 6bbeb656e..2573eeb36 100644 --- a/test/integration/projects_test.rb +++ b/test/integration/projects_test.rb @@ -23,22 +23,22 @@ class ProjectsTest < Redmine::IntegrationTest def test_archive_project subproject = Project.find(1).children.first log_user("admin", "admin") - get "admin/projects" + get "/admin/projects" assert_response :success assert_template "admin/projects" - post "projects/1/archive" + post "/projects/1/archive" assert_redirected_to "/admin/projects" assert !Project.find(1).active? - get 'projects/1' + get '/projects/1' assert_response 403 - get "projects/#{subproject.id}" + get "/projects/#{subproject.id}" assert_response 403 - post "projects/1/unarchive" + post "/projects/1/unarchive" assert_redirected_to "/admin/projects" assert Project.find(1).active? - get "projects/1" + get "/projects/1" assert_response :success end |