Skip to content

Commit

Permalink
Add more variety to provider factory provider_code
Browse files Browse the repository at this point in the history
  We are seeing collisions in provider codes
  • Loading branch information
inulty-dfe committed Jan 21, 2025
1 parent bdefe39 commit ef07a05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/factories/providers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
factory :provider do
provider_name { "ACME SCITT#{rand(1_000_000)}" }

sequence(:provider_code) { |n| format('A%02d', n % 100) }
sequence(:provider_code) { |n| format("#{('A'..'Z').to_a.sample}%02d", n % 100) }

trait :with_anonymised_data do
sequence(:provider_code) do |n|
Expand Down

0 comments on commit ef07a05

Please sign in to comment.