Sha256: 9b8ba7533c164ddbf8ca5d9a16a9114f706ecb77d0d59729a62e52a22d605de8

Contents?: true

Size: 898 Bytes

Versions: 46

Compression:

Stored size: 898 Bytes

Contents

require 'spec_helper'

describe ActiveAdmin::Resource, "authorization" do

  let(:app){ ActiveAdmin::Application.new }
  let(:namespace){ ActiveAdmin::Namespace.new(app, :admin) }
  let(:mock_auth){ mock }

  describe "authorization_adapter" do

    it "should return AuthorizationAdapter by default" do
      namespace.authorization_adapter.should == ActiveAdmin::AuthorizationAdapter
    end

    it "should be settable on the namespace" do
      namespace.authorization_adapter.should == ActiveAdmin::AuthorizationAdapter
      namespace.authorization_adapter = mock_auth

      namespace.authorization_adapter.should == mock_auth
    end

    it "should be settable on the application" do
      namespace.authorization_adapter.should == ActiveAdmin::AuthorizationAdapter
      app.authorization_adapter = mock_auth

      namespace.authorization_adapter.should == mock_auth
    end

  end

end

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.128 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.126 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.125 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.124 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.123 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.118 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.116 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.114 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.113 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.111 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.109 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb
lalala-4.0.0.dev.107 vendor/deps/active_admin/spec/unit/namespace/authorization_spec.rb