Sha256: 1d2d73a9325bbee8654af70f998db9757ababeed87fb39792c63fef9574d2475

Contents?: true

Size: 370 Bytes

Versions: 9

Compression:

Stored size: 370 Bytes

Contents

require 'test_helper'

class ACLSubjectMethodTest < ActionController::TestCase
  test "allow the only user to index" do
    assert ( user = User.create ).has_role! :the_only_one
    assert get :index, :user_id => user.id
    assert_response :ok
  end

  test "deny anonymous to index" do
    assert_raises Acl9::AccessDenied do
      assert get :index
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
acl9-2.1.2 test/controllers/acl_subject_method_test.rb
acl9-2.1.1 test/controllers/acl_subject_method_test.rb
acl9-2.1.0 test/controllers/acl_subject_method_test.rb
acl9-2.0.0 test/controllers/acl_subject_method_test.rb
acl9-1.3.0 test/controllers/acl_subject_method_test.rb
acl9-1.2.1 test/controllers/acl_subject_method_test.rb
acl9-1.2.0 test/controllers/acl_subject_method_test.rb
acl9-1.1.0 test/controllers/acl_subject_method_test.rb
acl9-1.0.0 test/controllers/acl_subject_method_test.rb