Sha256: 06c4a49d4c79114548210ef39882df6cd7f45c08185b2467311a3f8a4cb881ba

Contents?: true

Size: 647 Bytes

Versions: 1

Compression:

Stored size: 647 Bytes

Contents

require 'helper'

describe Bearcat::Client::GroupMemberships do
  before do
    @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token")
  end

  it "creates a group membership" do
    stub_post(@client, "/api/v1/groups/3/memberships").with(:body => {"user_id"=>"6"}).to_return(json_response("created_group_membership.json"))
    created_group_membership = @client.create_group_membership(3, { user_id: 6 })
    created_group_membership['id'] == 14
    created_group_membership['group_id'] == 3
    created_group_membership['workflow_state'] == 'accepted'
    created_group_membership['user_id'] == 6
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bearcat-1.2.10 spec/bearcat/group_memberships_spec.rb