Sha256: 537cbf8659f60cc656af60cb1c7bac1f473cd858480a026e21138f34e17ef9b8

Contents?: true

Size: 958 Bytes

Versions: 11

Compression:

Stored size: 958 Bytes

Contents

require 'spec_helper_no_rails'
require 'refinery/core/nil_user'

module Refinery
  module Core
    RSpec.describe NilUser do
      describe "plugins" do
        it "has all" do
          expect(subject.plugins).to eq(Refinery::Plugins.registered)
        end
      end

      describe "landing url" do
        let(:active_plugins) { double("active_plugins") }

        before do
          allow(subject).to receive(:active_plugins).and_return(active_plugins)
        end

        it "queries for the first landable url" do
          expect(active_plugins).to receive(:first_url_in_menu)
          subject.landing_url
        end
      end


      describe "roles" do
        it "responds to #has_role?" do
          expect(subject).to respond_to(:has_role?)
        end

        it "should have all roles by default" do
          expect(subject).to have_role(:zilch)
          expect(subject).to have_role(:arbitrary)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
refinerycms-core-4.0.3 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-4.0.2 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-4.0.1 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-3.0.6 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-4.0.0 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-3.0.5 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-3.0.4 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-3.0.3 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-3.0.2 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-3.0.1 spec/lib/refinery/core/nil_user_spec.rb
refinerycms-core-3.0.0 spec/lib/refinery/core/nil_user_spec.rb