Browse Source

test: update factory to pass saledate validation

pull/1232/head
natdeanlewissoftwire 3 years ago
parent
commit
0742ea8acc
  1. 8
      spec/factories/sales_log.rb

8
spec/factories/sales_log.rb

@ -3,18 +3,18 @@ FactoryBot.define do
created_by { FactoryBot.create(:user) }
owning_organisation { created_by.organisation }
managing_organisation { created_by.organisation }
created_at { Time.utc(2022, 2, 8, 16, 52, 15) }
updated_at { Time.utc(2022, 2, 8, 16, 52, 15) }
created_at { Time.utc(2023, 2, 8, 16, 52, 15) }
updated_at { Time.utc(2023, 2, 8, 16, 52, 15) }
trait :in_progress do
purchid { "PC123" }
ownershipsch { 2 }
type { 8 }
saledate { Time.utc(2022, 2, 2, 10, 36, 49) }
saledate { Time.utc(2023, 2, 2, 10, 36, 49) }
end
trait :completed do
ownershipsch { 2 }
type { 8 }
saledate { Time.utc(2022, 2, 2, 10, 36, 49) }
saledate { Time.utc(2023, 2, 2, 10, 36, 49) }
companybuy { 1 }
jointpur { 1 }
beds { 2 }

Loading…
Cancel
Save