summaryrefslogtreecommitdiffstats
path: root/test/integration/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-01 18:17:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-01 18:17:27 +0000
commit966f238da459fda40be8db48904dad7e4266a443 (patch)
tree33932b6969f6a6a55e8f8c6461de2c837d03ca07 /test/integration/lib
parentb834e81d7f41121fc6d9bef95ee090f8f466493e (diff)
downloadredmine-966f238da459fda40be8db48904dad7e4266a443.tar.gz
redmine-966f238da459fda40be8db48904dad7e4266a443.zip
Use Rails 5 syntax for integration tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@16586 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/lib')
-rw-r--r--test/integration/lib/redmine/field_format/attachment_format_test.rb12
-rw-r--r--test/integration/lib/redmine/hook_test.rb2
-rw-r--r--test/integration/lib/redmine/menu_manager_test.rb3
3 files changed, 9 insertions, 8 deletions
diff --git a/test/integration/lib/redmine/field_format/attachment_format_test.rb b/test/integration/lib/redmine/field_format/attachment_format_test.rb
index 98aa00548..d0debbb9f 100644
--- a/test/integration/lib/redmine/field_format/attachment_format_test.rb
+++ b/test/integration/lib/redmine/field_format/attachment_format_test.rb
@@ -51,7 +51,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
def test_create_with_attachment
issue = new_record(Issue) do
assert_difference 'Attachment.count' do
- post '/projects/ecookbook/issues', {
+ post '/projects/ecookbook/issues', :params => {
:issue => {
:subject => "Subject",
:custom_field_values => {
@@ -91,7 +91,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
def test_create_without_attachment
issue = new_record(Issue) do
assert_no_difference 'Attachment.count' do
- post '/projects/ecookbook/issues', {
+ post '/projects/ecookbook/issues', :params => {
:issue => {
:subject => "Subject",
:custom_field_values => {
@@ -117,7 +117,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
def test_failure_on_create_should_preserve_attachment
attachment = new_record(Attachment) do
assert_no_difference 'Issue.count' do
- post '/projects/ecookbook/issues', {
+ post '/projects/ecookbook/issues', :params => {
:issue => {
:subject => "",
:custom_field_values => {
@@ -136,7 +136,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
issue = new_record(Issue) do
assert_no_difference 'Attachment.count' do
- post '/projects/ecookbook/issues', {
+ post '/projects/ecookbook/issues', :params => {
:issue => {
:subject => "Subject",
:custom_field_values => {
@@ -160,7 +160,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
attachment = new_record(Attachment) do
assert_difference 'Issue.count' do
- post '/projects/ecookbook/issues', {
+ post '/projects/ecookbook/issues', :params => {
:issue => {
:subject => "Blank",
:custom_field_values => {
@@ -179,7 +179,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
attachment = new_record(Attachment) do
assert_no_difference 'Issue.count' do
- post '/projects/ecookbook/issues', {
+ post '/projects/ecookbook/issues', :params => {
:issue => {
:subject => "Blank",
:custom_field_values => {
diff --git a/test/integration/lib/redmine/hook_test.rb b/test/integration/lib/redmine/hook_test.rb
index 648decf53..f2d44d05d 100644
--- a/test/integration/lib/redmine/hook_test.rb
+++ b/test/integration/lib/redmine/hook_test.rb
@@ -107,7 +107,7 @@ VIEW
def test_controller_hook_context_should_include_request
Redmine::Hook.add_listener(ContextTestHook)
- post '/login', :username => 'admin', :password => 'admin'
+ post '/login', :params => {:username => 'admin', :password => 'admin'}
assert_not_nil ContextTestHook.context
context = ContextTestHook.context
assert_kind_of ActionDispatch::Request, context[:request]
diff --git a/test/integration/lib/redmine/menu_manager_test.rb b/test/integration/lib/redmine/menu_manager_test.rb
index 26d8680e8..fb4a64e38 100644
--- a/test/integration/lib/redmine/menu_manager_test.rb
+++ b/test/integration/lib/redmine/menu_manager_test.rb
@@ -29,7 +29,8 @@ 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',
+ :headers => {'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)