Sha256: 0ee8f6c717c49d9e8e63acb53e8ba711bd5a7be878252fad260f7906d8be1e2e

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

describe LinkedIn::API::NetworkUpdates, vcr: { cassette_name: 'network_updates' } do
  subject { LinkedIn::Client.new }

  context '#network_updates' do
    it 'fetches network updates for the current user' do
      network_updates = subject.network_updates
      expect(network_updates['_total']).to eq 13
      expect(network_updates['values']).to have(10).things
    end

    it 'fetches network updates by key' do
      network_updates = subject.network_updates(key: 'PROF-18939563-5794095336964247552-*1')
      network_updates['updatedFields']['values'].should have(1).thing
    end

    it 'fetches comments for network updates' do
      comments = subject.network_updates(key: 'PROF-18939563-5794095336964247552-*1', type: 'update-comments')
      comments['values'].first['comment'].should eq 'Whaaaat'
    end
    
    it 'fetches "likes" for network updates' do
      likes = subject.network_updates(key: 'PROF-18939563-5794095336964247552-*1', type: 'likes')
      likes['values'].first['person']['id'].should eq 'cDmdM9cb0H'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
linkedin2-0.0.19 spec/api/network_updates_spec.rb
linkedin2-0.0.18 spec/api/network_updates_spec.rb
linkedin2-0.0.17 spec/api/network_updates_spec.rb