fix facebook specs; comment controller specs

This commit is contained in:
danielgrippi 2011-12-12 10:59:15 -08:00 committed by Dennis Collinson
parent 414fb8d454
commit 9e4e58e002
3 changed files with 3 additions and 4 deletions

View file

@ -26,7 +26,7 @@ class CommentsController < ApplicationController
Postzord::Dispatcher.build(current_user, @comment).post
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.mobile{ render :partial => 'comment', :locals => {:post => @comment.post, :comment => @comment} }
end

View file

@ -42,7 +42,6 @@ class Services::Facebook < Service
end
def save_friends
return
url = "https://graph.facebook.com/me/friends?fields[]=name&fields[]=picture&access_token=#{URI.escape(self.access_token)}"
response = Faraday.get(url)
data = JSON.parse(response.body)['data']

View file

@ -22,8 +22,8 @@ describe CommentsController do
@post = alice.post :status_message, :text => 'GIANTS', :to => aspect_to_post
end
it 'responds to format js' do
post :create, comment_hash.merge(:format => 'js')
it 'responds to format json' do
post :create, comment_hash.merge(:format => 'json')
response.code.should == '201'
response.body.should match comment_hash[:text]
end