Sha256: 48677899ae6611a165ac6196bfc98e047a4f73ecaf9344b0b065480a33f8f396

Contents?: true

Size: 792 Bytes

Versions: 6

Compression:

Stored size: 792 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

module EventTypes
  class MembershipTest < Minitest::Test
    def setup
      @event_type_uri = "https://api.calendly.com/event_types/abc123"
      response = {body: fixture_file("event_type_hosts/list"), status: 200}
      stub(path: "event_type_memberships?event_type=#{@event_type_uri}", response: response)
    end

    def test_list
      event_type_hosts = client.event_types.list_memberships(event_type: @event_type_uri)

      assert_equal Calendlyr::Collection, event_type_hosts.class
      assert_equal Calendlyr::EventTypes::Membership, event_type_hosts.data.first.class
      assert_equal 1, event_type_hosts.data.count
      assert_equal "sNjq4TvMDfUHEl7zHRR0k0E1PCEJWvdi", event_type_hosts.next_page_token
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
calendlyr-0.7.5 test/calendlyr/resources/event_types/membership_test.rb
calendlyr-0.7.4 test/calendlyr/resources/event_types/membership_test.rb
calendlyr-0.7.3 test/calendlyr/resources/event_types/membership_test.rb
calendlyr-0.7.2 test/calendlyr/resources/event_types/membership_test.rb
calendlyr-0.7.1 test/calendlyr/resources/event_types/membership_test.rb
calendlyr-0.7.0 test/calendlyr/resources/event_types/membership_test.rb