Sha256: 8a78077982a6860fdc027d375c44f03be1f35e6db18e8e2a891b4aceee29086b

Contents?: true

Size: 664 Bytes

Versions: 11

Compression:

Stored size: 664 Bytes

Contents

require 'test_helper'

class RegistrationsControllerTest < ActionController::TestCase
  setup do
    login(users(:admin))
    request.env["devise.mapping"] = Devise.mappings[:user]
  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

11 entries across 11 versions & 1 rubygems

Version Path
contour-0.6.1 test/functional/registrations_controller_test.rb
contour-0.6.0 test/functional/registrations_controller_test.rb
contour-0.5.7 test/functional/registrations_controller_test.rb
contour-0.5.6 test/functional/registrations_controller_test.rb
contour-0.5.5 test/functional/registrations_controller_test.rb
contour-0.5.4 test/functional/registrations_controller_test.rb
contour-0.5.3 test/functional/registrations_controller_test.rb
contour-0.5.2 test/functional/registrations_controller_test.rb
contour-0.5.1 test/functional/registrations_controller_test.rb
contour-0.5.0 test/functional/registrations_controller_test.rb
contour-0.4.0 test/functional/registrations_controller_test.rb