Skip to content
Extraits de code Groupes Projets
Valider 213a1af0 rédigé par Daniel Grippi's avatar Daniel Grippi
Parcourir les fichiers

Merge pull request #2180 from Pistos/fix-oembed-spec

Fixed aspects_controller_spec.rb
parents cfe15068 2cd004da
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -110,9 +110,28 @@ describe AspectsController do
end
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").
with(:headers => {'Accept'=>'*/*'}).
to_return(:status => 200, :body => "<title>LazyTown song - Cooking By The Book</title>", :headers => {})
stub_request(
:get,
"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)
get :index
save_fixture(html_for("body"), "aspects_index_with_video_post")
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter