summaryrefslogtreecommitdiffstats
path: root/test/functional/auth_sources_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-11 11:53:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-11 11:53:28 +0000
commit71e636ff71791bafdc2638d4916c68f5235e957a (patch)
tree23f60b5f238397a5735ab3569b9eff3a0d185304 /test/functional/auth_sources_controller_test.rb
parentbd47af098fefef968647f7634105b22eb115d4b2 (diff)
downloadredmine-71e636ff71791bafdc2638d4916c68f5235e957a.tar.gz
redmine-71e636ff71791bafdc2638d4916c68f5235e957a.zip
Resourcified auth_sources.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9233 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/auth_sources_controller_test.rb')
-rw-r--r--test/functional/auth_sources_controller_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/auth_sources_controller_test.rb b/test/functional/auth_sources_controller_test.rb
index c7c297980..96dcb5c78 100644
--- a/test/functional/auth_sources_controller_test.rb
+++ b/test/functional/auth_sources_controller_test.rb
@@ -78,7 +78,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
end
def test_update
- post :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '192.168.0.10', :port => '389', :attr_login => 'uid'}
+ put :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '192.168.0.10', :port => '389', :attr_login => 'uid'}
assert_redirected_to '/auth_sources'
source = AuthSourceLdap.find(1)
@@ -87,7 +87,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
end
def test_update_with_failure
- post :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '', :port => '389', :attr_login => 'uid'}
+ put :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '', :port => '389', :attr_login => 'uid'}
assert_response :success
assert_template 'edit'
assert_error_tag :content => /host can't be blank/i
@@ -95,7 +95,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
def test_destroy
assert_difference 'AuthSourceLdap.count', -1 do
- post :destroy, :id => 1
+ delete :destroy, :id => 1
end
end
@@ -103,7 +103,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
User.find(2).update_attribute :auth_source_id, 1
assert_no_difference 'AuthSourceLdap.count' do
- post :destroy, :id => 1
+ delete :destroy, :id => 1
end
end