Created
September 29, 2011 20:41
-
-
Save noahhendrix/1251874 to your computer and use it in GitHub Desktop.
Testing a regular user can not create a user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
require 'clearance/testing' | |
class EmployeesControllerTest < ActionController::TestCase | |
test "an ASM can not create a user" do | |
sign_in | |
post :create, :employee => { :name => 'Feed Store' } | |
assert_raise CanCan::AccessDenied | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment