Sha256: 77df703ca2f036b6081ad6fae4f0530dafc3559686d9e492fc4249a3c033f307

Contents?: true

Size: 833 Bytes

Versions: 1

Compression:

Stored size: 833 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::TwitterStatusOnebox do
  before(:all) do
    @link = "https://twitter.com/discourse/status/504354595733504000"
    @uri = "https://api.twitter.com/1/statuses/oembed.json?id=504354595733504000"
    fake(@uri, response(described_class.onebox_name))
    onebox = described_class.new(@link)
    @html = onebox.to_html
  end
  let(:html) { @html }

  describe "#to_html" do
    it "includes tweet" do
      expect(html).to include("Introducing Discourse 1.0!")
    end

    it "includes timestamp" do
      pending
      expect(html).to include("August 26, 2014")
    end

    it "includes username" do
      expect(html).to include("discourse")
    end

    it "includes link" do
      expect(html).to include("https://twitter.com/discourse/statuses/504354595733504000")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onebox-1.4.7 spec/lib/onebox/engine/twitter_status_onebox_spec.rb