Sha256: cdbb0b3ba158471eb133c6eb43a81b5dbcb6d46b3383aac02da365a83b363616

Contents?: true

Size: 566 Bytes

Versions: 17

Compression:

Stored size: 566 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::PdfOnebox do
  let(:link) { "https://acrobatusers.com/assets/uploads/public_downloads/2217/adobe-acrobat-xi-merge-pdf-files-tutorial-ue.pdf" }
  let(:html) { described_class.new(link).to_html }

  before do
    FakeWeb.register_uri(:head, link, :content_length => "335562")
  end

  describe "#to_html" do
    it "includes filename" do
      expect(html).to include("adobe-acrobat-xi-merge-pdf-files-tutorial-ue.pdf")
    end

    it "includes filesize" do
      expect(html).to include("327.70 KB")
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
onebox-1.8.17 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.16 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.15 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.14 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.13 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.12 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.11 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.10 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.9 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.8 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.7 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.6 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.5 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.4 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.3 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.2 spec/lib/onebox/engine/pdf_onebox_spec.rb
onebox-1.8.1 spec/lib/onebox/engine/pdf_onebox_spec.rb