Sha256: f95735c9495c6cea9539d4685228735a96753230f9b9bfa1a5e8e8e88a4d4a9c

Contents?: true

Size: 1.09 KB

Versions: 104

Compression:

Stored size: 1.09 KB

Contents

require 'spec_helper'

describe FbGraph::Connections::Notes, '#notes' do
  context 'when included by FbGraph::User' do
    it 'should return notes as FbGraph::Note' do
      mock_graph :get, 'matake/notes', 'users/notes/matake_private', :access_token => 'access_token' do
        notes = FbGraph::User.new('matake', :access_token => 'access_token').notes
        notes.each do |note|
          note.should be_instance_of(FbGraph::Note)
        end
      end
    end
  end
end

describe FbGraph::Connections::Notes, '#note!' do
  context 'when included by FbGraph::Page' do
    it 'should return generated note' do
      mock_graph :post, '12345/notes', 'pages/notes/post_with_valid_access_token', :params => {
        :subject => 'test',
        :message => 'hello'
      }, :access_token => 'valid' do
        note = FbGraph::Page.new('12345', :access_token => 'valid').note!(:subject => 'test', :message => 'hello')
        note.identifier.should == 396664845100
        note.subject.should == 'test'
        note.message.should == 'hello'
        note.access_token.should == 'valid'
      end
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
fb_graph-2.7.17 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.16 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.15 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.14 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.13 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.12 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.11 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.10 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.9 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.8 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.7 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.6 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.5 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.4 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.3 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.2 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.1 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.7.0 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.6.7 spec/fb_graph/connections/notes_spec.rb
fb_graph-2.6.6 spec/fb_graph/connections/notes_spec.rb