Sha256: be67a7b52ea880216cb82a13d17d66dcd62167bc6a279e3f38235999139ff13a

Contents?: true

Size: 541 Bytes

Versions: 11

Compression:

Stored size: 541 Bytes

Contents

require 'spec_helper'

describe Onebox::Engine::YoukuOnebox do
  before do
    FakeWeb.register_uri(:get, 'http://v.youku.com/v_show/id_XNjM3MzAxNzc2.html', body: response('youku'), content_type: 'text/html')
    FakeWeb.register_uri(:get, 'http://v.youku.com/player/getPlayList/VideoIDS/XNjM3MzAxNzc2', body: response('youku-meta'), content_type: 'text/html')
  end

  it 'returns an image as the placeholder' do
    Onebox.preview('http://v.youku.com/v_show/id_XNjM3MzAxNzc2.html')
        .placeholder_html.should match(/<img/)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
onebox-1.5.17 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.16 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.14 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.13 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.12 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.11 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.10 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.9 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.8 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.7 spec/lib/onebox/engine/youku_onebox_spec.rb
onebox-1.5.6 spec/lib/onebox/engine/youku_onebox_spec.rb