Sha256: 76f98c39acdf991773ad97d9afda815c44a1f38777293dfab3617d3efa57f49c

Contents?: true

Size: 408 Bytes

Versions: 5

Compression:

Stored size: 408 Bytes

Contents

require 'test_helper'

class ACLObjectsHashTest < ActionController::TestCase
  setup do
    assert @user = User.create
    assert @user.has_role! :owner, Foo.first_or_create
  end

  test "objects hash preferred to @ivar" do
    assert get :allow, params: { user_id: @user.id }
    assert_response :ok
  end

  test "unauthed for no user" do
    assert get :allow
    assert_response :unauthorized
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
careacademy-acl9-3.4.0 test/controllers/acl_object_hash_test.rb
careacademy-acl9-3.3.0 test/controllers/acl_object_hash_test.rb
acl9-3.2.0 test/controllers/acl_object_hash_test.rb
acl9-3.1.0 test/controllers/acl_object_hash_test.rb
acl9-3.0.0 test/controllers/acl_object_hash_test.rb