Skip to content

Commit

Permalink
fix various spec
Browse files Browse the repository at this point in the history
  • Loading branch information
njaeggi committed Aug 21, 2024
1 parent 921de2e commit 8443e2b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/domain/invoices/abacus/sales_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def full_attrs
def sales_order_attrs
{
# customer id is defined to be the same as subject id
customer_id: entity.person.reload.abacus_subject_key,
customer_id: entity.person.abacus_subject_key,
order_date: entity.issued_at,
delivery_date: entity.sent_at,
total_amount: entity.total.to_f,
Expand Down
4 changes: 4 additions & 0 deletions spec/abilities/json_api/external_invoice_ability_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
group: groups(:bluemlisalp_funktionaere)).person
end

before do
external_invoices(:external_invoice_draft).destroy!
end

context "index" do
def accessible_by(user)
ExternalInvoice.accessible_by(described_class.new(user))
Expand Down
4 changes: 4 additions & 0 deletions spec/abilities/token_ability_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

let(:ability) { TokenAbility.new(token) }

before do
external_invoices(:external_invoice_draft).destroy!
end

describe "index_external_invoices on Group" do
context :root do
let(:token) { service_tokens(:permitted_root_layer_token) }
Expand Down
4 changes: 4 additions & 0 deletions spec/resources/external_invoice/reads_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
]
end

before do
external_invoices(:external_invoice_draft).destroy!
end

it "serializes expected attributes" do
render
data = jsonapi_data[0]
Expand Down

0 comments on commit 8443e2b

Please sign in to comment.