Sha256: 14ceacfa116c607b52083b48ae46605433c76964a88e9dae0244207d7d1fe6d1

Contents?: true

Size: 1.03 KB

Versions: 14

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

describe 'curation_concerns/single_use_links_viewer/show.html.erb' do
  let(:f) do
    file = FileSet.create do |gf|
      gf.apply_depositor_metadata('jill')
    end
    Hydra::Works::AddFileToFileSet.call(file, File.open(fixture_path + '/world.png'), :original_file)
    file
  end

  let(:solr_document) { SolrDocument.new(has_model_ssim: ['FileSet']) }
  let(:ability) { double }

  let(:hash) { "some-dummy-sha2-hash" }

  before do
    assign :asset, f
    assign :download_link, CurationConcerns::Engine.routes.url_helpers.download_single_use_link_path(hash)
    assign :presenter, CurationConcerns::FileSetPresenter.new(solr_document, ability)
    view.lookup_context.view_paths.push 'app/views/curation_concerns/base'
    render
  end

  it "contains a download link" do
    expect(rendered).to have_selector "a[href^='/single_use_link/download/']"
  end

  it "has turbolinks disabled in the download link" do
    expect(rendered).to have_selector "a[data-turbolinks^='false'][href^='/single_use_link/download/']"
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.7 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-2.0.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-2.0.0.rc2 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.6 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.5 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.4 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.3 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.2 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-2.0.0.rc1 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.1 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.7.0.beta1 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.6.3 spec/views/single_use_links_viewer/show.html.erb_spec.rb