Sha256: c61cde0ecf2d51ee9f18fd87cf8459f64083bbb3fd88ff52782bb138ffdc4b04
Contents?: true
Size: 994 Bytes
Versions: 115
Compression:
Stored size: 994 Bytes
Contents
require 'test_helper' class Contour::PasswordsControllerTest < ActionController::TestCase setup do # login(users(:admin)) request.env["devise.mapping"] = Devise.mappings[:user] end test "should be able to view forget password" do get :new assert_response :success end test "should be able to request new password" do post :create, user: { email: 'valid@example.com' } assert_equal I18n.t('devise.passwords.send_instructions'), flash[:notice] assert_redirected_to new_user_session_path end # test "an admin should be able to create new user" do # assert_difference('User.count') do # post :create, user: { first_name: 'First Name', last_name: 'Last Name', status: 'active', email: 'new_registration@example.com', # steering_committee: true, steering_committee_secretary: false, pp_committee: false, pp_committee_secretary: false, system_admin: false } # end # # assert_redirected_to user_path(assigns(:user)) # end end
Version data entries
115 entries across 115 versions & 1 rubygems