Sha256: 886c16aa26851a4893c4cf4217d1cd8c2419a93436d91b91ac416de01a910622

Contents?: true

Size: 661 Bytes

Versions: 65

Compression:

Stored size: 661 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::XkcdOnebox do
  let(:link) { "https://xkcd.com/327/" }
  let(:api_link) { "https://xkcd.com/327/info.0.json" }
  let(:html) { described_class.new(link).to_html }

  before do
    fake(api_link, response("xkcd"))
  end

  it "has the comic's description" do
    expect(html).to include("Her daughter is named Help")
  end

  it "has the comic's title" do
    expect(html).to include("Exploits of a Mom")
  end

  it "has the permalink to the comic" do
    expect(html).to include(link)
  end

  it "has the comic image" do
    expect(html).to include("http://imgs.xkcd.com/comics/exploits_of_a_mom.png")
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

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