mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-25 16:47:15 +00:00
fix source indent of test/integration/admin_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20554 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3f1bb5c8b2
commit
4e8f817ad5
@ -33,7 +33,9 @@ class AdminTest < Redmine::IntegrationTest
|
||||
get "/users/new"
|
||||
assert_response :success
|
||||
|
||||
post "/users", :params => {
|
||||
post(
|
||||
"/users",
|
||||
:params => {
|
||||
:user => {
|
||||
:login => "psmith", :firstname => "Paul",
|
||||
:lastname => "Smith", :mail => "psmith@somenet.foo",
|
||||
@ -41,7 +43,7 @@ class AdminTest < Redmine::IntegrationTest
|
||||
:password_confirmation => "psmith09"
|
||||
}
|
||||
}
|
||||
|
||||
)
|
||||
user = User.find_by_login("psmith")
|
||||
assert_kind_of User, user
|
||||
assert_redirected_to "/users/#{ user.id }/edit"
|
||||
@ -50,24 +52,30 @@ class AdminTest < Redmine::IntegrationTest
|
||||
assert_kind_of User, logged_user
|
||||
assert_equal "Paul", logged_user.firstname
|
||||
|
||||
put "/users/#{user.id}", :params => {
|
||||
put(
|
||||
"/users/#{user.id}",
|
||||
:params => {
|
||||
:id => user.id,
|
||||
:user => {
|
||||
:status => User::STATUS_LOCKED
|
||||
}
|
||||
}
|
||||
)
|
||||
assert_redirected_to "/users/#{ user.id }/edit"
|
||||
locked_user = User.try_to_login("psmith", "psmith09")
|
||||
assert_nil locked_user
|
||||
end
|
||||
|
||||
test "Add a user as an anonymous user should fail" do
|
||||
post '/users', :params => {
|
||||
post(
|
||||
'/users',
|
||||
:params => {
|
||||
:user => {
|
||||
:login => 'psmith', :firstname => 'Paul',
|
||||
:password => "psmith09", :password_confirmation => "psmith09"
|
||||
}
|
||||
}
|
||||
)
|
||||
assert_response :redirect
|
||||
assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fusers"
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user