Sha256: 9ec3d3c8995e613e44beb6ccbad2e17490ae66960c304ba9b62df3762e2c8810

Contents?: true

Size: 764 Bytes

Versions: 17

Compression:

Stored size: 764 Bytes

Contents

require 'spec_helper'

describe 'curation_concerns/single_use_links/new_download.html.erb' do
  let(:user) { create(:user) }

  let(:f) do
    file = FileSet.create do |gf|
      gf.apply_depositor_metadata(user)
    end
    Hydra::Works::AddFileToFileSet.call(file, File.open(fixture_path + '/world.png'), :original_file)
    file
  end

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

  before do
    assign :asset, f
    assign :link, CurationConcerns::Engine.routes.url_helpers.download_single_use_link_path(hash)
    render
  end

  it "has the download link" do
    expect(rendered).to have_selector "a.download-link"
  end

  it "has turbolinks disabled in the download link" do
    expect(rendered).to have_selector "a.download-link[data-no-turbolink]"
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
curation_concerns-0.12.0.pre8 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.12.0.pre7 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.12.0.pre6 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.12.0.pre5 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.12.0.pre4 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.12.0.pre3 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.12.0.pre2 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.12.0.pre1 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.11.0 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.11.0.rc1 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.10.0 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.9.0 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.8.0 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.7.0 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.6.0 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.5.0 spec/views/single_use_links/new_download.html.erb_spec.rb
curation_concerns-0.4.0 spec/views/single_use_links/new_download.html.erb_spec.rb