Sha256: 83d497dd003df3995dca26bf7353265edf9c8f5853771981ef71823a544a71d9
Contents?: true
Size: 871 Bytes
Versions: 17
Compression:
Stored size: 871 Bytes
Contents
require 'spec_helper' describe FbGraph2::User do describe '.me' do it 'should not call API' do expect do me = described_class.me 'token' me.should be_instance_of described_class end.not_to request_to 'me' end context 'when fetched' do it 'should call API' do me = mock_graph :get, 'me', 'user/me' do described_class.me('token').fetch end me.should be_instance_of described_class end context 'when ext attrs included' do it 'should success to parse' do me = mock_graph :get, 'me', 'user/me_with_ext_attrs' do described_class.me('token').fetch end [ :age_range, :context, :currency, :devices ].each do |key| me.send(key).should be_present end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems