Sha256: 3865fd9ddd4da974a35271f1fe05357531c0f29e7d5f34b69efc74c96c9cf176

Contents?: true

Size: 774 Bytes

Versions: 6

Compression:

Stored size: 774 Bytes

Contents

require 'spec_helper'

describe 'single_use_links/new_download.html.erb' do
  let(:user) { FactoryGirl.find_or_create(:jill) }
  let(:file) do
    GenericFile.create do |f|
      f.add_file(File.open(fixture_path + '/world.png'), path: 'content', original_name: 'world.png')
      f.label = 'world.png'
      f.apply_depositor_metadata(user)
    end
  end

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

  before do
    assign :asset, file
    assign :link, Sufia::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

6 entries across 6 versions & 1 rubygems

Version Path
sufia-6.7.0 spec/views/single_use_links/new_download.html.erb_spec.rb
sufia-6.6.1 spec/views/single_use_links/new_download.html.erb_spec.rb
sufia-6.6.0 spec/views/single_use_links/new_download.html.erb_spec.rb
sufia-6.5.0 spec/views/single_use_links/new_download.html.erb_spec.rb
sufia-6.4.0 spec/views/single_use_links/new_download.html.erb_spec.rb
sufia-6.3.0 spec/views/single_use_links/new_download.html.erb_spec.rb