From ca80b753e74558078b5c032a6c9d21d1b29fb29d Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Fri, 11 Feb 2022 16:55:39 +0100 Subject: [PATCH] Autocorrect Faker deprecations --- spec/factories/contacts.rb | 8 ++++---- spec/factories/events.rb | 2 +- spec/factories/tracks.rb | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/factories/contacts.rb b/spec/factories/contacts.rb index edec9ea9..1be2ab37 100644 --- a/spec/factories/contacts.rb +++ b/spec/factories/contacts.rb @@ -5,10 +5,10 @@ FactoryBot.define do social_tag { SecureRandom.urlsafe_base64(4) } email { Faker::Internet.email } sponsor_email { Faker::Internet.email } - facebook { Faker::Internet.url('facebook.com') } - googleplus { Faker::Internet.url('plus.google.com') } - twitter { Faker::Internet.url('twitter.com') } - instagram { Faker::Internet.url('instagram.com') } + facebook { Faker::Internet.url(host: 'facebook.com') } + googleplus { Faker::Internet.url(host: 'plus.google.com') } + twitter { Faker::Internet.url(host: 'twitter.com') } + instagram { Faker::Internet.url(host: 'instagram.com') } conference end diff --git a/spec/factories/events.rb b/spec/factories/events.rb index f7861705..34f64d83 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -5,7 +5,7 @@ FactoryBot.define do factory :event do title { Faker::Hipster.sentence } - abstract { Faker::Hipster.paragraph(2) } + abstract { Faker::Hipster.paragraph(sentence_count: 2) } program diff --git a/spec/factories/tracks.rb b/spec/factories/tracks.rb index 34bf1b9f..be57b94b 100644 --- a/spec/factories/tracks.rb +++ b/spec/factories/tracks.rb @@ -2,7 +2,7 @@ FactoryBot.define do factory :track do - name { Faker::Commerce.department(2, true) } + name { Faker::Commerce.department(max: 2, fixed_amount: true) } description { Faker::Lorem.sentence } color { Faker::Color.hex_color } short_name { SecureRandom.urlsafe_base64(5) } @@ -17,7 +17,7 @@ FactoryBot.define do start_date { Time.zone.today } end_date { Time.zone.today } room - relevance { Faker::Hipster.paragraph(2) } + relevance { Faker::Hipster.paragraph(sentence_count: 2) } end end end