comparison test/integration/admin_test.rb @ 514:7eba09d624db live

Merge
author Chris Cannam
date Thu, 14 Jul 2011 10:50:53 +0100
parents af80e5618e9b
children cbb26bc654de
comparison
equal deleted inserted replaced
512:b9aebdd7dd40 514:7eba09d624db
13 # 13 #
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software 15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 require "#{File.dirname(__FILE__)}/../test_helper" 18 require File.expand_path('../../test_helper', __FILE__)
19 19
20 class AdminTest < ActionController::IntegrationTest 20 class AdminTest < ActionController::IntegrationTest
21 fixtures :all 21 fixtures :all
22 22
23 def test_add_user 23 def test_add_user
24 log_user("admin", "admin") 24 log_user("admin", "admin")
25 get "/users/new" 25 get "/users/new"
26 assert_response :success 26 assert_response :success
27 assert_template "users/new" 27 assert_template "users/new"
28 post "/users/create", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en" }, :password => "psmith09", :password_confirmation => "psmith09" 28 post "/users/create", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en", :password => "psmith09", :password_confirmation => "psmith09" }
29 29
30 user = User.find_by_login("psmith") 30 user = User.find_by_login("psmith")
31 assert_kind_of User, user 31 assert_kind_of User, user
32 assert_redirected_to "/users/#{ user.id }/edit" 32 assert_redirected_to "/users/#{ user.id }/edit"
33 33