Skip to content
Extraits de code Groupes Projets
Valider 9e4e58e0 rédigé par danielgrippi's avatar danielgrippi Validation de Dennis Collinson
Parcourir les fichiers

fix facebook specs; comment controller specs

parent 414fb8d4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -26,7 +26,7 @@ class CommentsController < ApplicationController ...@@ -26,7 +26,7 @@ class CommentsController < ApplicationController
Postzord::Dispatcher.build(current_user, @comment).post Postzord::Dispatcher.build(current_user, @comment).post
respond_to do |format| respond_to do |format|
format.json { render :json => @comment.as_api_response(:backbone) } format.json { render :json => @comment.as_api_response(:backbone), :status => 201 }
format.html{ render :nothing => true, :status => 201 } format.html{ render :nothing => true, :status => 201 }
format.mobile{ render :partial => 'comment', :locals => {:post => @comment.post, :comment => @comment} } format.mobile{ render :partial => 'comment', :locals => {:post => @comment.post, :comment => @comment} }
end end
......
...@@ -42,7 +42,6 @@ class Services::Facebook < Service ...@@ -42,7 +42,6 @@ class Services::Facebook < Service
end end
def save_friends def save_friends
return
url = "https://graph.facebook.com/me/friends?fields[]=name&fields[]=picture&access_token=#{URI.escape(self.access_token)}" url = "https://graph.facebook.com/me/friends?fields[]=name&fields[]=picture&access_token=#{URI.escape(self.access_token)}"
response = Faraday.get(url) response = Faraday.get(url)
data = JSON.parse(response.body)['data'] data = JSON.parse(response.body)['data']
......
...@@ -22,8 +22,8 @@ describe CommentsController do ...@@ -22,8 +22,8 @@ describe CommentsController do
@post = alice.post :status_message, :text => 'GIANTS', :to => aspect_to_post @post = alice.post :status_message, :text => 'GIANTS', :to => aspect_to_post
end end
it 'responds to format js' do it 'responds to format json' do
post :create, comment_hash.merge(:format => 'js') post :create, comment_hash.merge(:format => 'json')
response.code.should == '201' response.code.should == '201'
response.body.should match comment_hash[:text] response.body.should match comment_hash[:text]
end end
......
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