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.4.0 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.9 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.8 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.7 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.6 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.5 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.4 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.3 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.2 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.1 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.3.0 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.9 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.8 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.7 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.6 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.5 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.4 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.3 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.2 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb
onebox-1.2.1 spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb