diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-12 13:39:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-12 13:39:55 +0000 |
commit | cde02954c84591c66c575f0d76d44c18ab6edf95 (patch) | |
tree | edd7847b9c329720c914575c884a1c1904fc6fd7 /test/integration | |
parent | a4d7a99c22d9aac89a38c1cb411158777b72bb9d (diff) | |
download | redmine-cde02954c84591c66c575f0d76d44c18ab6edf95.tar.gz redmine-cde02954c84591c66c575f0d76d44c18ab6edf95.zip |
Moves password param to user hash param so that it can be set using the User API.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4493 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/users_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/integration/api_test/users_test.rb b/test/integration/api_test/users_test.rb index 1fc4b2032..83be388a7 100644 --- a/test/integration/api_test/users_test.rb +++ b/test/integration/api_test/users_test.rb @@ -54,13 +54,13 @@ class ApiTest::UsersTest < ActionController::IntegrationTest context "POST /users" do context "with valid parameters" do setup do - @parameters = {:user => {:login => 'foo', :firstname => 'Firstname', :lastname => 'Lastname', :mail => 'foo@example.net'}} + @parameters = {:user => {:login => 'foo', :firstname => 'Firstname', :lastname => 'Lastname', :mail => 'foo@example.net', :password => 'secret'}} end context ".xml" do should_allow_api_authentication(:post, '/users.xml', - {:user => {:login => 'foo', :firstname => 'Firstname', :lastname => 'Lastname', :mail => 'foo@example.net'}}, + {:user => {:login => 'foo', :firstname => 'Firstname', :lastname => 'Lastname', :mail => 'foo@example.net', :password => 'secret'}}, {:success_code => :created}) should "create a user with the attributes" do @@ -74,6 +74,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest assert_equal 'Lastname', user.lastname assert_equal 'foo@example.net', user.mail assert !user.admin? + assert user.check_password?('secret') assert_response :created assert_equal 'application/xml', @response.content_type |