Skip to content

Commit

Permalink
fix existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abdellani authored and sigmundpetersen committed Dec 8, 2023
1 parent fea910f commit 4a22224
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion spec/system/admin/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1078,10 +1078,11 @@ def serching_for_customers
].join(" ").upcase
}

let(:invoice_number){ "#{order.distributor_id}-1" }
let(:table_contents) {
[
Invoice.first.created_at.strftime('%B %d, %Y').to_s,
"1",
invoice_number,
"0.0",
"Active",
"Download"
Expand Down
7 changes: 5 additions & 2 deletions spec/system/admin/orders/invoices_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,13 @@
describe 'listing invoices' do
let(:date){ Time.current.to_date }

let(:first_invoice){ "#{distributor.id}-1" }
let(:second_invoice){ "#{distributor.id}-2" }

let(:row1){
[
I18n.l(date, format: :long),
"2",
second_invoice,
order.total,
"Active",
"Download"
Expand All @@ -183,7 +186,7 @@
let(:row2){
[
I18n.l(date, format: :long),
"1",
first_invoice,
order.total,
"Cancelled",
"Download"
Expand Down

0 comments on commit 4a22224

Please sign in to comment.