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.5.64 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.63 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.62 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.61 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.60 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.50 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.49 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.48 spec/lib/onebox/engine/google_docs_onebox_spec.rb
onebox-1.5.47 spec/lib/onebox/engine/google_docs_onebox_spec.rb