summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test/users_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-02 19:59:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-02 19:59:52 +0000
commit131f258f5fba320a779bdd69e3681beab07fb8e3 (patch)
tree70f0804372dbab34476c5acb2c30c87fee61560e /test/integration/api_test/users_test.rb
parent395fe0d777f2f41c1594ae95f1199ae8de25c184 (diff)
downloadredmine-131f258f5fba320a779bdd69e3681beab07fb8e3.tar.gz
redmine-131f258f5fba320a779bdd69e3681beab07fb8e3.zip
Test cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8477 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test/users_test.rb')
-rw-r--r--test/integration/api_test/users_test.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/integration/api_test/users_test.rb b/test/integration/api_test/users_test.rb
index ab301fe18..744a09ee4 100644
--- a/test/integration/api_test/users_test.rb
+++ b/test/integration/api_test/users_test.rb
@@ -60,7 +60,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
end
should "return current user" do
- get '/users/current.xml', {}, :authorization => credentials('jsmith')
+ get '/users/current.xml', {}, credentials('jsmith')
assert_tag :tag => 'user',
:child => {:tag => 'id', :content => '2'}
@@ -91,7 +91,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
should "create a user with the attributes" do
assert_difference('User.count') do
- post '/users.xml', @parameters, :authorization => credentials('admin')
+ post '/users.xml', @parameters, credentials('admin')
end
user = User.first(:order => 'id DESC')
@@ -120,7 +120,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
should "create a user with the attributes" do
assert_difference('User.count') do
- post '/users.json', @parameters, :authorization => credentials('admin')
+ post '/users.json', @parameters, credentials('admin')
end
user = User.first(:order => 'id DESC')
@@ -148,7 +148,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
context ".xml" do
should "return errors" do
assert_no_difference('User.count') do
- post '/users.xml', @parameters, :authorization => credentials('admin')
+ post '/users.xml', @parameters, credentials('admin')
end
assert_response :unprocessable_entity
@@ -163,7 +163,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
context ".json" do
should "return errors" do
assert_no_difference('User.count') do
- post '/users.json', @parameters, :authorization => credentials('admin')
+ post '/users.json', @parameters, credentials('admin')
end
assert_response :unprocessable_entity
@@ -199,7 +199,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
should "update user with the attributes" do
assert_no_difference('User.count') do
- put '/users/2.xml', @parameters, :authorization => credentials('admin')
+ put '/users/2.xml', @parameters, credentials('admin')
end
user = User.find(2)
@@ -224,7 +224,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
should "update user with the attributes" do
assert_no_difference('User.count') do
- put '/users/2.json', @parameters, :authorization => credentials('admin')
+ put '/users/2.json', @parameters, credentials('admin')
end
user = User.find(2)
@@ -252,7 +252,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
context ".xml" do
should "return errors" do
assert_no_difference('User.count') do
- put '/users/2.xml', @parameters, :authorization => credentials('admin')
+ put '/users/2.xml', @parameters, credentials('admin')
end
assert_response :unprocessable_entity
@@ -267,7 +267,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
context ".json" do
should "return errors" do
assert_no_difference('User.count') do
- put '/users/2.json', @parameters, :authorization => credentials('admin')
+ put '/users/2.json', @parameters, credentials('admin')
end
assert_response :unprocessable_entity
@@ -290,7 +290,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
should "delete user" do
assert_difference('User.count', -1) do
- delete '/users/2.xml', {}, :authorization => credentials('admin')
+ delete '/users/2.xml', {}, credentials('admin')
end
assert_response :ok
@@ -305,7 +305,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
should "delete user" do
assert_difference('User.count', -1) do
- delete '/users/2.json', {}, :authorization => credentials('admin')
+ delete '/users/2.json', {}, credentials('admin')
end
assert_response :ok