Sha256: 2c40480df9660bc147054ce9dbe11a9614513237aaa8e3b7667e4e20e24dba6b
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require "spec_helper" describe Onebox::Engine::DotsubOnebox do before(:all) do @link = "http://dotsub.com/view/665bd0d5-a9f4-4a07-9d9e-b31ba926ca78" fake(@link, response(described_class.template_name)) end before(:each) { Onebox.defaults.cache.clear } let(:link) { @link } it_behaves_like "an engine" describe "#to_html" do let(:html) { described_class.new(link).to_html } it "returns video title" do expect(html).to include("Twitter in Plain English") end it "returns video description" do # og:decription tag spelled wrong in http response pending expect(html).to include("A short explanation of the micro-blogging service, Twitter.") end it "returns video photo" do expect(html).to include("/665bd0d5-a9f4-4a07-9d9e-b31ba926ca78/p") end it "returns video URL" do expect(html).to include("dotsub.com/media/665bd0d5-a9f4-4a07-9d9e-b31ba926ca78/m/flv/") end it "returns URL" do expect(html).to include("http://dotsub.com/view/665bd0d5-a9f4-4a07-9d9e-b31ba926ca78") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
onebox-1.1.0 | spec/lib/onebox/engine/dotsub_onebox_spec.rb |