Sha256: 0bf95226038bbf9557e8a469af9411fadfa55ff90da341d55d4ff64ed0d0dc76

Contents?: true

Size: 984 Bytes

Versions: 69

Compression:

Stored size: 984 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::GoogleDocsOnebox do
  context "Spreadsheets" do
    let(:matcher) { described_class.new("https://docs.google.com/spreadsheets/d/SHEET_KEY/pubhtml") }

    it "should be a spreadsheet" do
      expect(matcher.send(:shorttype)).to eq (:sheets)
    end
  end

  context "Documents" do
    let(:matcher) { described_class.new("https://docs.google.com/document/d/DOC_KEY/pub") }

    it "should be a document" do
      expect(matcher.send(:shorttype)).to eq (:docs)
    end
  end

  context "Presentaions" do
    let(:matcher) { described_class.new("https://docs.google.com/presentation/d/PRESENTATION_KEY/pub") }

    it "should be a presentation" do
      expect(matcher.send(:shorttype)).to eq (:slides)
    end
  end

  context "Forms" do
    let(:matcher) { described_class.new("https://docs.google.com/forms/d/FORMS_KEY/viewform") }

    it "should be a form" do
      expect(matcher.send(:shorttype)).to eq (:forms)
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
onebox-1.8.39 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.38 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.36 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.35 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.34 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.33 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.32 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.31 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.30 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.29 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.28 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.27 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.26 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.25 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.24 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.23 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.22 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.21 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.20 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.8.19 spec/lib/onebox/engine/google_docs_onebox_spec.rb