Sha256: efde411938e39ef2fec89f3fbb85bc17528ae2b8af0822974ef4fc49cf9b8609

Contents?: true

Size: 954 Bytes

Versions: 41

Compression:

Stored size: 954 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::ClassicGoogleMapsOnebox do
  describe 'long form url' do
    before do
      @link = "https://maps.google.ca/maps?q=Eiffel+Tower,+Avenue+Anatole+France,+Paris,+France&hl=en&sll=43.656878,-79.32085&sspn=0.932941,1.50238&oq=eiffel+&t=m&z=17&iwloc=A"
    end

    include_context "engines"
    it_behaves_like "an engine"

    describe "#to_html" do
      it "embeds the iframe to display the map" do
        expect(html).to include("iframe")
      end
    end
  end

  describe 'short form url' do
    let(:long_url) { "https://maps.google.ca/maps?q=Brooklyn+Bridge,+Brooklyn,+NY,+United+States&hl=en&sll=43.656878,-79.32085&sspn=0.932941,1.50238&oq=brooklyn+bridge&t=m&z=17&iwloc=A" }

    it "retrieves the long form url" do
      onebox = described_class.new("http://goo.gl/maps/XffUa")
      onebox.expects(:get_long_url).once.returns(long_url)
      expect(onebox.url).to eq(long_url)
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
onebox-1.5.12 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.11 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.10 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.9 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.8 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.7 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.6 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.5 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.3 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.2 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.1 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.5.0 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.9 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.8 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.7 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.5 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.4 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.3 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.2 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.4.1 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb