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-1.0.0.beta11 test/functional/passwords_controller_test.rb
contour-1.0.0.beta10 test/functional/passwords_controller_test.rb
contour-1.0.0.beta9 test/functional/passwords_controller_test.rb
contour-1.0.0.beta8 test/functional/passwords_controller_test.rb
contour-1.0.0.beta7 test/functional/passwords_controller_test.rb
contour-1.0.0.beta6 test/functional/passwords_controller_test.rb
contour-1.0.0.beta5 test/functional/passwords_controller_test.rb
contour-1.0.0.beta4 test/functional/passwords_controller_test.rb
contour-1.0.0.beta3 test/functional/passwords_controller_test.rb
contour-1.0.0.beta2 test/functional/passwords_controller_test.rb
contour-1.0.0.beta test/functional/passwords_controller_test.rb
contour-0.10.2 test/functional/passwords_controller_test.rb
contour-0.10.1 test/functional/passwords_controller_test.rb
contour-0.10.0 test/functional/passwords_controller_test.rb
contour-0.9.4 test/functional/passwords_controller_test.rb