Sha256: e86694c5d93bfb046017b06d95da7c70a986185751331cce24291b491adaddf6

Contents?: true

Size: 618 Bytes

Versions: 13

Compression:

Stored size: 618 Bytes

Contents

# frozen_string_literal: true
RSpec.shared_examples "an authorization handler" do
  before do
    unless respond_to?(:handler)
      raise "You need to define `handler` (an instance of the authorization handler) in order to run the shared examples."
    end
  end

  describe "to_partial_path" do
    subject { handler.to_partial_path }
    it { is_expected.to be_kind_of(String) }
  end

  describe "handler_name" do
    subject { handler.handler_name }
    it { is_expected.to be_kind_of(String) }
  end

  describe "metadata" do
    subject { handler.metadata }
    it { is_expected.to be_kind_of(Hash) }
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
decidim-dev-0.1.0 lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.1.0 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb
decidim-dev-0.0.8.1 lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.0.8.1 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb
decidim-dev-0.0.8 lib/decidim/dev/test/authorization_shared_examples.rb
decidim-dev-0.0.7 lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.0.7 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb
decidim-dev-0.0.6 lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.0.6 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.0.5 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.0.4 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.0.3 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb
decidim-0.0.2 decidim-dev/lib/decidim/dev/test/authorization_shared_examples.rb