Sha256: c2d8df99706fa344c8473f1d7e5786e07e406b458f9628bf55b93e6ff8ea8e4f

Contents?: true

Size: 841 Bytes

Versions: 6

Compression:

Stored size: 841 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe Yammer::Api::GroupMembership do

  before :all do
    @client = Yammer::Client.new(
      :site_url     => 'https://www.yammer.com',
      :client_id     => 'PRbTcg9qjgKsp4jjpm1pw',
      :client_secret => 'Xn7kp7Ly0TCY4GtZWkmSsqGEPg10DmMADyjWkf2U',
      :access_token  => 'TolNOFka9Uls2DxahNi78A'
    )
  end

  subject { @client }

  describe '#get_group_membership' do
    it 'should fetch a group membership' do
      subject.should_receive(:get).with('/api/v1/group_memberships/1')
      subject.get_group_membership(1)
    end
  end

  describe '#create_group_membership' do
    it 'should create a group membership' do
      subject.should_receive(:post).with('/api/v1/group_memberships', { :group_id => 2 })
      subject.create_group_membership(2)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yammer-client-0.1.8 spec/api/group_membership_spec.rb
yammer-client-0.1.7 spec/api/group_membership_spec.rb
yammer-client-0.1.6 spec/api/group_membership_spec.rb
yammer-client-0.1.5 spec/api/group_membership_spec.rb
yammer-client-0.1.4 spec/api/group_membership_spec.rb
yammer-client-0.1.3 spec/api/group_membership_spec.rb