Skip to content

Commit

Permalink
Use correct route in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-truong-main committed Feb 4, 2024
1 parent adcbca5 commit 706b010
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/requests/partners_requests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
end

it "sends invitation email and approve partner in single step" do
post single_step_invite_and_approve_partner_path(default_params.merge(id: partner.id))
post invite_and_approve_partner_path(default_params.merge(id: partner.id))

expect(PartnerInviteService).to have_received(:new).with(partner: partner, force: true)
expect(response).to have_http_status(:found)
Expand All @@ -459,7 +459,7 @@
end

it "should redirect to the partners index page with a notice flash message" do
post single_step_invite_and_approve_partner_path(default_params.merge(id: partner.id))
post invite_and_approve_partner_path(default_params.merge(id: partner.id))

expect(response).to redirect_to(partners_path(organization_id: @organization.to_param))
expect(flash[:notice]).to eq("Failed to invite #{partner.name}! #{fake_error_msg}")
Expand All @@ -477,7 +477,7 @@
end

it "should redirect to the partners index page with a notice flash message" do
post single_step_invite_and_approve_partner_path(default_params.merge(id: partner.id))
post invite_and_approve_partner_path(default_params.merge(id: partner.id))

expect(response).to redirect_to(partners_path(organization_id: @organization.to_param))
expect(flash[:error]).to eq("Failed to approve partner because: #{fake_error_msg}")
Expand Down

0 comments on commit 706b010

Please sign in to comment.