Moves mail_notification 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@4496 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-12-12 14:19:24 +00:00
parent 1d4f28a54d
commit 9e2d401f43
5 changed files with 15 additions and 23 deletions

View File

@@ -54,7 +54,7 @@ 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', :password => 'secret'}}
@parameters = {:user => {:login => 'foo', :firstname => 'Firstname', :lastname => 'Lastname', :mail => 'foo@example.net', :password => 'secret', :mail_notification => 'only_assigned'}}
end
context ".xml" do
@@ -73,6 +73,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
assert_equal 'Firstname', user.firstname
assert_equal 'Lastname', user.lastname
assert_equal 'foo@example.net', user.mail
assert_equal 'only_assigned', user.mail_notification
assert !user.admin?
assert user.check_password?('secret')