Prevent random failures due to params order.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8849 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-02-11 14:53:31 +00:00
parent b5fabd052b
commit 627754366c
1 changed files with 9 additions and 9 deletions

View File

@ -121,7 +121,7 @@ class ContextMenusControllerTest < ActionController::TestCase
field = IssueCustomField.create!(:name => 'List', :field_format => 'list', field = IssueCustomField.create!(:name => 'List', :field_format => 'list',
:possible_values => ['Foo', 'Bar'], :is_for_all => true, :tracker_ids => [1, 2, 3]) :possible_values => ['Foo', 'Bar'], :is_for_all => true, :tracker_ids => [1, 2, 3])
@request.session[:user_id] = 2 @request.session[:user_id] = 2
get :issues, :ids => [1, 2] get :issues, :ids => [1]
assert_tag 'a', assert_tag 'a',
:content => 'List', :content => 'List',
@ -130,10 +130,10 @@ class ContextMenusControllerTest < ActionController::TestCase
assert_tag 'a', assert_tag 'a',
:content => 'Foo', :content => 'Foo',
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;ids%5B%5D=2&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=Foo"} :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=Foo"}
assert_tag 'a', assert_tag 'a',
:content => 'none', :content => 'none',
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;ids%5B%5D=2&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D="} :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D="}
end end
def test_context_menu_should_not_include_null_value_for_required_custom_fields def test_context_menu_should_not_include_null_value_for_required_custom_fields
@ -170,7 +170,7 @@ class ContextMenusControllerTest < ActionController::TestCase
field = IssueCustomField.create!(:name => 'Bool', :field_format => 'bool', field = IssueCustomField.create!(:name => 'Bool', :field_format => 'bool',
:is_for_all => true, :tracker_ids => [1, 2, 3]) :is_for_all => true, :tracker_ids => [1, 2, 3])
@request.session[:user_id] = 2 @request.session[:user_id] = 2
get :issues, :ids => [1, 2] get :issues, :ids => [1]
assert_tag 'a', assert_tag 'a',
:content => 'Bool', :content => 'Bool',
@ -179,14 +179,14 @@ class ContextMenusControllerTest < ActionController::TestCase
assert_tag 'a', assert_tag 'a',
:content => 'Yes', :content => 'Yes',
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;ids%5B%5D=2&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=1"} :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=1"}
end end
def test_context_menu_should_include_user_custom_fields def test_context_menu_should_include_user_custom_fields
field = IssueCustomField.create!(:name => 'User', :field_format => 'user', field = IssueCustomField.create!(:name => 'User', :field_format => 'user',
:is_for_all => true, :tracker_ids => [1, 2, 3]) :is_for_all => true, :tracker_ids => [1, 2, 3])
@request.session[:user_id] = 2 @request.session[:user_id] = 2
get :issues, :ids => [1, 2] get :issues, :ids => [1]
assert_tag 'a', assert_tag 'a',
:content => 'User', :content => 'User',
@ -195,13 +195,13 @@ class ContextMenusControllerTest < ActionController::TestCase
assert_tag 'a', assert_tag 'a',
:content => 'John Smith', :content => 'John Smith',
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;ids%5B%5D=2&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=2"} :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=2"}
end end
def test_context_menu_should_include_version_custom_fields def test_context_menu_should_include_version_custom_fields
field = IssueCustomField.create!(:name => 'Version', :field_format => 'version', :is_for_all => true, :tracker_ids => [1, 2, 3]) field = IssueCustomField.create!(:name => 'Version', :field_format => 'version', :is_for_all => true, :tracker_ids => [1, 2, 3])
@request.session[:user_id] = 2 @request.session[:user_id] = 2
get :issues, :ids => [1, 2] get :issues, :ids => [1]
assert_tag 'a', assert_tag 'a',
:content => 'Version', :content => 'Version',
@ -210,7 +210,7 @@ class ContextMenusControllerTest < ActionController::TestCase
assert_tag 'a', assert_tag 'a',
:content => '2.0', :content => '2.0',
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;ids%5B%5D=2&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=3"} :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&amp;issue%5Bcustom_field_values%5D%5B#{field.id}%5D=3"}
end end
def test_context_menu_by_assignable_user_should_include_assigned_to_me_link def test_context_menu_by_assignable_user_should_include_assigned_to_me_link