mirror of
https://github.com/nov/fb_graph2
synced 2023-03-27 23:22:15 -04:00
23 lines
No EOL
495 B
Ruby
23 lines
No EOL
495 B
Ruby
require 'spec_helper'
|
|
|
|
describe FbGraph2::User do
|
|
describe '.me' do
|
|
let(:klass) { FbGraph2::User }
|
|
|
|
it 'should not call API' do
|
|
expect do
|
|
me = klass.me 'token'
|
|
me.should be_instance_of klass
|
|
end.not_to request_to 'me'
|
|
end
|
|
|
|
context 'when fetched' do
|
|
it 'should call API' do
|
|
me = mock_graph :get, 'me', 'user/me' do
|
|
FbGraph2::User.me('token').fetch
|
|
end
|
|
me.should be_instance_of klass
|
|
end
|
|
end
|
|
end
|
|
end |