Skip to content

Commit

Permalink
Fix invoices factory to avoid flakyness
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishant Samel committed Jul 1, 2024
1 parent ae4babf commit e753a40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/factories/invoices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# amount_paid { Faker::Number.decimal(r_digits: 2) }
# amount_due { Faker::Number.decimal(r_digits: 2) }
# discount { Faker::Number.decimal(r_digits: 2) }
status { [:draft, :paid, :overdue].sample }
status { :draft }
external_view_key { "#{SecureRandom.hex}" }
factory :invoice_with_invoice_line_items do
transient do
Expand Down
2 changes: 1 addition & 1 deletion spec/system/invoices/invoice_history_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "rails_helper"

RSpec.describe "View Invoice Logs", type: :system do
let!(:invoice) { create :invoice_with_invoice_line_items, status: :draft }
let!(:invoice) { create :invoice_with_invoice_line_items }
let(:client) { invoice.client }
let!(:company) { invoice.company }
let(:admin) { create(:user, current_workspace_id: company.id) }
Expand Down
2 changes: 1 addition & 1 deletion spec/system/invoices/send_invoice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "rails_helper"

RSpec.describe "Send Invoice", type: :system do
let(:invoice) { create :invoice_with_invoice_line_items, status: :draft }
let(:invoice) { create :invoice_with_invoice_line_items }
let(:client) { invoice.client }
let(:company) { invoice.company }
let(:admin) { create(:user, current_workspace_id: company.id) }
Expand Down

0 comments on commit e753a40

Please sign in to comment.