Skip to content

Commit

Permalink
add checkes on successful result
Browse files Browse the repository at this point in the history
  • Loading branch information
annvelents committed Dec 13, 2024
1 parent cb45b22 commit b756b1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

it 'selects the section for the organization' do
expect { service_result }.to change(organization.selected_invoice_custom_sections, :count).from(1).to(0)
expect(service_result).to be_success
expect(organization.selected_invoice_custom_sections).to eq([])
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
it 'updates the invoice custom section' do
result = service_result

expect(result).to be_success
expect(result.invoice_custom_section.name).to eq('Updated Name')
expect(InvoiceCustomSections::SelectService).to have_received(:call)
.with(section: invoice_custom_section, organization: organization)
Expand Down

0 comments on commit b756b1e

Please sign in to comment.