Sha256: c039cf67af756ba2da46e0d4283714e2ae13209bc3a0c89c8363394690657f82

Contents?: true

Size: 758 Bytes

Versions: 4

Compression:

Stored size: 758 Bytes

Contents

require 'spec_helper.rb'

describe 'curation_concern/base/_thumbnail.html.erb' do
  describe 'with an image file' do
    it 'displays a thumbnail' do
      img = stub_model(GenericFile, image?: true, pid: 'curate:foo1')

      render(partial: 'thumbnail', locals: {thumbnail: img})

      expect(rendered).to include(download_path(img, {datastream_id: 'thumbnail'}))
    end
  end

  describe 'with an audio file' do
    it 'displays a generic image' do
      audio_file = stub_model(GenericFile, audit_stat: true, pid: 'curate:foo1', audio?: true)

      render(partial: 'thumbnail', locals: {thumbnail: audio_file})

      expect(rendered).to include(curation_concern_generic_file_path(audio_file.noid))
    end
  end

  describe 'with a video file'
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
curate-0.6.6 spec/views/curation_concern/base/_thumbnail.html.erb_spec.rb
curate-0.6.5 spec/views/curation_concern/base/_thumbnail.html.erb_spec.rb
curate-0.6.4 spec/views/curation_concern/base/_thumbnail.html.erb_spec.rb
curate-0.6.3 spec/views/curation_concern/base/_thumbnail.html.erb_spec.rb