Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
annvelents committed Dec 23, 2024
1 parent 9ae5723 commit 793f4c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spec/services/invoice_custom_sections/create_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
.and change(organization.reload.selected_invoice_custom_sections, :count).by(1)
expect(service_result.invoice_custom_section).to be_persisted.and have_attributes(create_params)
expect(Organizations::SelectInvoiceCustomSectionService).to have_received(:call)
.with(section: service_result.invoice_custom_section, organization: organization)
.with(section: service_result.invoice_custom_section)
end
end

Expand All @@ -43,7 +43,7 @@
expect { service_result }.to change(organization.invoice_custom_sections, :count).by(1)
expect(service_result.invoice_custom_section).to be_persisted.and have_attributes(create_params)
expect(Organizations::SelectInvoiceCustomSectionService).not_to have_received(:call)
.with(section: service_result.invoice_custom_section, organization: organization)
.with(section: service_result.invoice_custom_section)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/services/invoice_custom_sections/update_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

before do
allow(Organizations::SelectInvoiceCustomSectionService).to receive(:call).and_call_original
allow(Organizations::DeselectInvoiceCustomSectionServicee).to receive(:call).and_call_original
allow(Organizations::DeselectInvoiceCustomSectionService).to receive(:call).and_call_original
end

describe '#call' do
Expand All @@ -31,7 +31,7 @@

it 'calls Deselect::ForOrganizationService when selected is false' do
service_result
expect(Organizations::DeselectInvoiceCustomSectionServicee).to have_received(:call)
expect(Organizations::DeselectInvoiceCustomSectionService).to have_received(:call)
.with(section: invoice_custom_section)
end
end
Expand Down

0 comments on commit 793f4c1

Please sign in to comment.