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

Version Path
contour-2.7.0 test/controllers/passwords_controller_test.rb
contour-2.7.0.beta1 test/controllers/passwords_controller_test.rb
contour-2.6.0 test/controllers/passwords_controller_test.rb
contour-2.6.0.rc test/controllers/passwords_controller_test.rb
contour-2.6.0.beta8 test/controllers/passwords_controller_test.rb
contour-2.6.0.beta7 test/controllers/passwords_controller_test.rb
contour-2.6.0.beta6 test/controllers/passwords_controller_test.rb
contour-2.6.0.beta5 test/controllers/passwords_controller_test.rb
contour-2.6.0.beta4 test/controllers/passwords_controller_test.rb
contour-2.6.0.beta3 test/controllers/passwords_controller_test.rb
contour-2.6.0.beta2 test/controllers/passwords_controller_test.rb
contour-2.6.0.beta1 test/controllers/passwords_controller_test.rb
contour-2.5.0 test/controllers/passwords_controller_test.rb
contour-2.5.0.beta1 test/controllers/passwords_controller_test.rb
contour-2.4.0 test/controllers/passwords_controller_test.rb
contour-2.4.0.rc2 test/controllers/passwords_controller_test.rb
contour-2.4.0.rc test/controllers/passwords_controller_test.rb
contour-2.4.0.beta3 test/controllers/passwords_controller_test.rb
contour-2.4.0.beta2 test/controllers/passwords_controller_test.rb
contour-2.4.0.beta1 test/controllers/passwords_controller_test.rb