Sha256: 34fd282a75a571cbb69648e38f491cfe750b184dbc704a3f27c2c0e475b8adba

Contents?: true

Size: 1.03 KB

Versions: 52

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-no-turbolink][href^='/single_use_link/download/']"
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
curation_concerns-1.6.2 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.6.1 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.6.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.5.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.4.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.3.3 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.3.2 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.3.1 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.3.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.2.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.1.2 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.1.1 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.1.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.0.0 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.0.0.beta10 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.0.0.beta9 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.0.0.beta8 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.0.0.beta7 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.0.0.beta6 spec/views/single_use_links_viewer/show.html.erb_spec.rb
curation_concerns-1.0.0.beta5 spec/views/single_use_links_viewer/show.html.erb_spec.rb