Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "domain" from directory query params #259

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/workos/directory_sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class << self
# Retrieve directories.
#
# @param [Hash] options An options hash
# @option options [String] domain The domain of the directory to be
# retrieved.
# @option options [String] search A search term for direcory names.
# @option options [String] limit Maximum number of records to return.
# @option options [String] order The order in which to paginate records
Expand Down
23 changes: 0 additions & 23 deletions spec/lib/workos/directory_sync_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,6 @@
end
end

context 'with domain option' do
it 'forms the proper request to the API' do
request_args = [
'/directories?domain=foo-corp.com&'\
'order=desc',
'Content-Type' => 'application/json'
]

expected_request = Net::HTTP::Get.new(*request_args)

expect(Net::HTTP::Get).to receive(:new).with(*request_args).
and_return(expected_request)

VCR.use_cassette 'directory_sync/list_directories/with_domain' do
directories = described_class.list_directories(
domain: 'foo-corp.com',
)

expect(directories.data.size).to eq(1)
end
end
end

context 'with search option' do
it 'forms the proper request to the API' do
request_args = [
Expand Down