mirror of
https://github.com/redmine/redmine.git
synced 2025-11-16 18:26:02 +01:00
0.3 unstable
git-svn-id: http://redmine.rubyforge.org/svn/trunk@12 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -25,18 +25,18 @@ class AdminTest < ActionController::IntegrationTest
|
||||
get "/users/add"
|
||||
assert_response :success
|
||||
assert_template "users/add"
|
||||
post "/users/add", :user => { :login => "jsmith", :firstname => "John", :lastname => "Smith", :mail => "jsmith@somenet.foo", :language => "en" }, :password => "jsmith09", :password_confirmation => "jsmith09"
|
||||
post "/users/add", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en" }, :password => "psmith09", :password_confirmation => "psmith09"
|
||||
assert_redirected_to "users/list"
|
||||
|
||||
user = User.find_by_login("jsmith")
|
||||
user = User.find_by_login("psmith")
|
||||
assert_kind_of User, user
|
||||
logged_user = User.try_to_login("jsmith", "jsmith09")
|
||||
logged_user = User.try_to_login("psmith", "psmith09")
|
||||
assert_kind_of User, logged_user
|
||||
assert_equal "John", logged_user.firstname
|
||||
assert_equal "Paul", logged_user.firstname
|
||||
|
||||
post "users/edit", :id => user.id, :user => { :locked => 1 }
|
||||
post "users/edit", :id => user.id, :user => { :status => User::STATUS_LOCKED }
|
||||
assert_redirected_to "users/list"
|
||||
locked_user = User.try_to_login("jsmith", "jsmith09")
|
||||
locked_user = User.try_to_login("psmith", "psmith09")
|
||||
assert_equal nil, locked_user
|
||||
end
|
||||
|
||||
@@ -45,13 +45,13 @@ class AdminTest < ActionController::IntegrationTest
|
||||
get "projects/add"
|
||||
assert_response :success
|
||||
assert_template "projects/add"
|
||||
post "projects/add", :project => { :name => "blog", :descr => "weblog", :is_public => 1}
|
||||
post "projects/add", :project => { :name => "blog", :description => "weblog", :is_public => 1}
|
||||
assert_redirected_to "admin/projects"
|
||||
assert_equal 'Project was successfully created.', flash[:notice]
|
||||
|
||||
project = Project.find_by_name("blog")
|
||||
assert_kind_of Project, project
|
||||
assert_equal "weblog", project.descr
|
||||
assert_equal "weblog", project.description
|
||||
assert_equal true, project.is_public?
|
||||
|
||||
get "admin/projects"
|
||||
|
||||
Reference in New Issue
Block a user