Sha256: 6fcc42be02c54fba0a4eca7658ddb0a532f5a89a31ac6215bc4cf5851a5948cf

Contents?: true

Size: 825 Bytes

Versions: 8

Compression:

Stored size: 825 Bytes

Contents

require 'core/spec_helper'

describe ZendeskAPI::Group, :delete_after do
  def valid_attributes
    { :name => "My Group" }
  end

  it_should_be_creatable
  it_should_be_updatable :name
  it_should_be_deletable :find => [:deleted?, true]
  it_should_be_readable :groups
  it_should_be_readable :groups, :assignable

  context "with a membership" do
    before(:each) do
      VCR.use_cassette("read_ZendeskAPI::User_groups_create") do
        @object = described_class.create!(client, valid_attributes.merge(default_options))
        @membership = agent.group_memberships.create(:group_id => @object.id, :user_id => agent.id)
      end
    end

    after(:each) do
      VCR.use_cassette("read_ZendeskAPI::User_groups_delete") do
        @object.destroy
      end
    end

    it_should_be_readable agent, :groups
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
zendesk_api-0.3.2 spec/live/group_spec.rb
zendesk_api-0.3.1 spec/live/group_spec.rb
zendesk_api-0.3.0 spec/live/group_spec.rb
zendesk_api-0.2.6 spec/live/group_spec.rb
zendesk_api-0.2.5 spec/live/group_spec.rb
zendesk_api-0.2.4 spec/live/group_spec.rb
zendesk_api-0.2.2 spec/live/group_spec.rb
zendesk_api-0.2.1 spec/live/group_spec.rb