Skip to content

Commit

Permalink
fix existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abdellani committed Nov 13, 2023
1 parent d81310e commit 5656d9e
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 @@ -1065,10 +1065,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 @@ -171,10 +171,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 @@ -184,7 +187,7 @@
let(:row2){
[
I18n.l(date, format: :long),
"1",
first_invoice,
order.total,
"Cancelled",
"Download"
Expand Down

0 comments on commit 5656d9e

Please sign in to comment.