diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-25 17:17:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-25 17:17:49 +0000 |
commit | 5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7 (patch) | |
tree | 93e57765139714bd82dede475725516c448c0d55 /test/integration | |
parent | 34e20c4373b7f5a20ab3a132feae3f70f21ec477 (diff) | |
download | redmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.tar.gz redmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.zip |
Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/issue_relations_test.rb | 2 | ||||
-rw-r--r-- | test/integration/api_test/memberships_test.rb | 2 | ||||
-rw-r--r-- | test/integration/issues_test.rb | 4 | ||||
-rw-r--r-- | test/integration/projects_test.rb | 2 | ||||
-rw-r--r-- | test/integration/routing/activities_test.rb | 4 | ||||
-rw-r--r-- | test/integration/routing/repositories_test.rb | 10 | ||||
-rw-r--r-- | test/integration/routing/wiki_test.rb | 12 |
7 files changed, 19 insertions, 17 deletions
diff --git a/test/integration/api_test/issue_relations_test.rb b/test/integration/api_test/issue_relations_test.rb index 55fd761a9..46a14462e 100644 --- a/test/integration/api_test/issue_relations_test.rb +++ b/test/integration/api_test/issue_relations_test.rb @@ -75,7 +75,7 @@ class ApiTest::IssueRelationsTest < ActionController::IntegrationTest end assert_response :unprocessable_entity - assert_tag :errors, :child => {:tag => 'error', :content => 'relation_type is not included in the list'} + assert_tag :errors, :child => {:tag => 'error', :content => /relation_type is not included in the list/} end end end diff --git a/test/integration/api_test/memberships_test.rb b/test/integration/api_test/memberships_test.rb index dcda2c4dd..0243b3f04 100644 --- a/test/integration/api_test/memberships_test.rb +++ b/test/integration/api_test/memberships_test.rb @@ -167,7 +167,7 @@ class ApiTest::MembershipsTest < ActionController::IntegrationTest assert_response :unprocessable_entity assert_equal 'application/xml', @response.content_type - assert_tag 'errors', :child => {:tag => 'error', :content => "member_roles is invalid"} + assert_tag 'errors', :child => {:tag => 'error', :content => /member_roles is invalid/} end end end diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb index 4f5503026..ee03abd87 100644 --- a/test/integration/issues_test.rb +++ b/test/integration/issues_test.rb @@ -215,14 +215,14 @@ class IssuesTest < ActionController::IntegrationTest assert_not_equal subject, Issue.find(1).subject post '/issues/1', {:issue => {:subject => subject}}, credentials('jsmith') - assert_response 405 + assert_response 404 assert_not_equal subject, Issue.find(1).subject end def test_get_watch_should_be_invalid assert_no_difference 'Watcher.count' do get '/watchers/watch?object_type=issue&object_id=1', {}, credentials('jsmith') - assert_response 405 + assert_response 404 end end end diff --git a/test/integration/projects_test.rb b/test/integration/projects_test.rb index 1abe6ad96..51a97aafb 100644 --- a/test/integration/projects_test.rb +++ b/test/integration/projects_test.rb @@ -45,7 +45,7 @@ class ProjectsTest < ActionController::IntegrationTest def test_modules_should_not_allow_get assert_no_difference 'EnabledModule.count' do get '/projects/1/modules', {:enabled_module_names => ['']}, credentials('jsmith') - assert_response :method_not_allowed + assert_response 404 end end end diff --git a/test/integration/routing/activities_test.rb b/test/integration/routing/activities_test.rb index 6fb63e351..8475ff555 100644 --- a/test/integration/routing/activities_test.rb +++ b/test/integration/routing/activities_test.rb @@ -21,11 +21,11 @@ class RoutingActivitiesTest < ActionController::IntegrationTest def test_activities assert_routing( { :method => 'get', :path => "/activity" }, - { :controller => 'activities', :action => 'index', :id => nil } + { :controller => 'activities', :action => 'index' } ) assert_routing( { :method => 'get', :path => "/activity.atom" }, - { :controller => 'activities', :action => 'index', :id => nil, :format => 'atom' } + { :controller => 'activities', :action => 'index', :format => 'atom' } ) assert_routing( { :method => 'get', :path => "/projects/33/activity" }, diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb index 60a1d408b..ce8a2db89 100644 --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -21,7 +21,7 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest def setup @path_hash = repository_path_hash(%w[path to file.c]) assert_equal "path/to/file.c", @path_hash[:path] - assert_equal %w[path to file.c], @path_hash[:param] + assert_equal "path/to/file.c", @path_hash[:param] end def test_repositories_resources @@ -124,7 +124,7 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :method => 'get', :path => "/projects/redmine/repository/revisions/2457/show" }, { :controller => 'repositories', :action => 'show', :id => 'redmine', - :path => empty_path_param, :rev => '2457' } + :rev => '2457' } ) assert_routing( { :method => 'get', @@ -136,7 +136,7 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :method => 'get', :path => "/projects/redmine/repository/revisions/2457/changes" }, { :controller => 'repositories', :action => 'changes', :id => 'redmine', - :path => empty_path_param, :rev => '2457' } + :rev => '2457' } ) assert_routing( { :method => 'get', @@ -205,7 +205,7 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :method => 'get', :path => "/projects/redmine/repository/foo/revisions/2457/show" }, { :controller => 'repositories', :action => 'show', :id => 'redmine', :repository_id => 'foo', - :path => empty_path_param, :rev => '2457' } + :rev => '2457' } ) assert_routing( { :method => 'get', @@ -217,7 +217,7 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :method => 'get', :path => "/projects/redmine/repository/foo/revisions/2457/changes" }, { :controller => 'repositories', :action => 'changes', :id => 'redmine', :repository_id => 'foo', - :path => empty_path_param, :rev => '2457' } + :rev => '2457' } ) assert_routing( { :method => 'get', diff --git a/test/integration/routing/wiki_test.rb b/test/integration/routing/wiki_test.rb index 35ee4310c..ef652e260 100644 --- a/test/integration/routing/wiki_test.rb +++ b/test/integration/routing/wiki_test.rb @@ -90,11 +90,13 @@ class RoutingWikiTest < ActionController::IntegrationTest { :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida' } ) - assert_routing( - { :method => 'post', :path => "/projects/567/wiki/CookBook_documentation/preview" }, - { :controller => 'wiki', :action => 'preview', :project_id => '567', - :id => 'CookBook_documentation' } - ) + ["post", "put"].each do |method| + assert_routing( + { :method => method, :path => "/projects/567/wiki/CookBook_documentation/preview" }, + { :controller => 'wiki', :action => 'preview', :project_id => '567', + :id => 'CookBook_documentation' } + ) + end assert_routing( { :method => 'post', :path => "/projects/22/wiki/ladida/rename" }, { :controller => 'wiki', :action => 'rename', :project_id => '22', |