Sha256: b30c15458a703a021c1b2137f0a9bd6338e5f6a720795fa8f8ab3ea0a4d44039

Contents?: true

Size: 615 Bytes

Versions: 33

Compression:

Stored size: 615 Bytes

Contents

require 'spec_helper'

describe '#document_action_path' do
  before do
    allow(helper).to receive_messages(controller_name: 'catalog')
  end

  let(:document_action_config) { Blacklight::Configuration::ToolConfig.new(tool_config) }
  let(:document) { SolrDocument.new(id: '123') }

  subject { helper.document_action_path(document_action_config, id: document) }

  context "for endnote" do
    let(:tool_config) { { if: :render_refworks_action?, partial: "document_action",
      name: :endnote, key: :endnote, path: :single_endnote_catalog_path } }

    it { is_expected.to eq '/catalog/123.endnote' }
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
blacklight-5.19.2 spec/helpers/component_helper_spec.rb
blacklight-5.19.1 spec/helpers/component_helper_spec.rb
blacklight-5.19.0 spec/helpers/component_helper_spec.rb
blacklight-5.18.0 spec/helpers/component_helper_spec.rb
blacklight-5.17.2 spec/helpers/component_helper_spec.rb
blacklight-5.17.1 spec/helpers/component_helper_spec.rb
blacklight-5.17.0 spec/helpers/component_helper_spec.rb
blacklight-5.16.4 spec/helpers/component_helper_spec.rb
blacklight-5.16.3 spec/helpers/component_helper_spec.rb
blacklight-5.16.2 spec/helpers/component_helper_spec.rb
blacklight-5.16.1 spec/helpers/component_helper_spec.rb
blacklight-5.16.0 spec/helpers/component_helper_spec.rb
blacklight-5.15.0 spec/helpers/component_helper_spec.rb
blacklight-5.14.0 spec/helpers/component_helper_spec.rb
blacklight-5.13.1 spec/helpers/component_helper_spec.rb
blacklight-5.13.0 spec/helpers/component_helper_spec.rb
blacklight-5.11.3 spec/helpers/component_helper_spec.rb
blacklight-5.12.1 spec/helpers/component_helper_spec.rb
blacklight-5.12.0 spec/helpers/component_helper_spec.rb
blacklight-5.10.3 spec/helpers/component_helper_spec.rb