Sha256: 1c2126e8a9d7d610369598d17163d4d3e911e2831a66ca9ea6c25bdba3cab8fc

Contents?: true

Size: 760 Bytes

Versions: 7

Compression:

Stored size: 760 Bytes

Contents

require 'spec_helper'

describe "dashboard/_index_partials/_thumbnail_display.html.erb" do
  describe "for an audio object" do
    before do
      allow(view).to receive(:document).and_return(stub_model(GenericFile, mime_type: 'audio/wav', noid: '123'))
    end
    it "should show the audio thumbnail" do
      render
      rendered.should match /src="\/assets\/audio.png"/
    end
  end
  describe "for an document object" do
    before do
      allow(view).to receive(:document).and_return(stub_model(GenericFile, mime_type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', noid: '123'))
    end
    it "should show the default thumbnail" do
      render
      rendered.should match /src="\/assets\/default.png"/
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sufia-4.0.0.beta2 spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb
sufia-4.0.0.beta1 spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb
sufia-3.7.2 spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb
sufia-3.7.1 spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb
sufia-3.7.0 spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb
sufia-3.6.1 spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb
sufia-3.6.0 spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb