Added an additional stub_request so aspects_controller_spec.rb passes under more conditions.
This commit is contained in:
parent
cfe1506847
commit
2cd004da24
1 changed files with 22 additions and 3 deletions
|
|
@ -110,9 +110,28 @@ describe AspectsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "generates a jasmine fixture with a post containing a video", :fixture => true do
|
it "generates a jasmine fixture with a post containing a video", :fixture => true do
|
||||||
stub_request(:get, "http://gdata.youtube.com/feeds/api/videos/UYrkQL1bX4A?v=2").
|
stub_request(
|
||||||
with(:headers => {'Accept'=>'*/*'}).
|
:get,
|
||||||
to_return(:status => 200, :body => "<title>LazyTown song - Cooking By The Book</title>", :headers => {})
|
"http://gdata.youtube.com/feeds/api/videos/UYrkQL1bX4A?v=2"
|
||||||
|
).with(
|
||||||
|
:headers => {'Accept'=>'*/*'}
|
||||||
|
).to_return(
|
||||||
|
:status => 200,
|
||||||
|
:body => "<title>LazyTown song - Cooking By The Book</title>",
|
||||||
|
:headers => {}
|
||||||
|
)
|
||||||
|
|
||||||
|
stub_request(
|
||||||
|
:get,
|
||||||
|
"http://www.youtube.com/oembed?format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://www.youtube.com/watch?v=UYrkQL1bX4A"
|
||||||
|
).with(
|
||||||
|
:headers => {'Accept'=>'*/*'}
|
||||||
|
).to_return(
|
||||||
|
:status => 200,
|
||||||
|
:body => "{ title: 'LazyTown song - Cooking By The Book' }",
|
||||||
|
:headers => {}
|
||||||
|
)
|
||||||
|
|
||||||
alice.post(:status_message, :text => "http://www.youtube.com/watch?v=UYrkQL1bX4A", :to => @alices_aspect_2.id)
|
alice.post(:status_message, :text => "http://www.youtube.com/watch?v=UYrkQL1bX4A", :to => @alices_aspect_2.id)
|
||||||
get :index
|
get :index
|
||||||
save_fixture(html_for("body"), "aspects_index_with_video_post")
|
save_fixture(html_for("body"), "aspects_index_with_video_post")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue