Skip to content

Commit

Permalink
Fix bug in Applicants#advance_applicants (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrom committed Apr 30, 2024
1 parent cf90736 commit ecab3c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/fountain/api/applicants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ def self.advance_applicant(applicant_id, advance_options = {})
# skip_automated_actions - `true` if you want to skip automated
# actions when advancing the applicant
# funnel_id - Used for bulk advancing applicants to a workflow-based funnel
def self.advance_applicants(applicant_ids, stage_id, advance_options = {})
def self.advance_applicants(applicant_ids, stage_id, advanced_options = {})
response = request(
"/v2/applicants/advance?#{stage_id}",
"/v2/applicants/advance?stage_id=#{stage_id}",
method: :post,
body: Util.slice_hash(
advance_options,
advanced_options,
:skip_automated_actions, :funnel_id
).merge(ids: applicant_ids)
)
Expand Down
4 changes: 2 additions & 2 deletions spec/fountain/api/applicants_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
describe '.advance_applicants' do
before do
# Stubs for /v2/applicants/advance REST API
stub_authed_request(:post, '/v2/applicants/advance?stage-id')
stub_authed_request(:post, '/v2/applicants/advance?stage_id=stage-id')
.with(
body: {
skip_automated_actions: true,
Expand All @@ -401,7 +401,7 @@
)
.to_return(status: 204)

stub_authed_request(:post, '/v2/applicants/advance?stage-id')
stub_authed_request(:post, '/v2/applicants/advance?stage_id=stage-id')
.with(
body: {
skip_automated_actions: true,
Expand Down

0 comments on commit ecab3c3

Please sign in to comment.