Bump factorybot rails (#475)
* Bump factory_bot_rails from 4.10.0 to 4.11.0 Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails) from 4.10.0 to 4.11.0. - [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases) - [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/master/NEWS) - [Commits](https://github.com/thoughtbot/factory_bot_rails/compare/v4.10.0...v4.11.0) Signed-off-by: dependabot[bot] <support@dependabot.com> * Update factories to always use blocks
This commit is contained in:
parent
a3dbc246e5
commit
519d1e1fea
18 changed files with 55 additions and 55 deletions
2
Gemfile
2
Gemfile
|
|
@ -132,7 +132,7 @@ group :test do
|
|||
gem "approvals", "~> 0.0"
|
||||
gem "chromedriver-helper", "~> 1.2"
|
||||
gem "database_cleaner", "~> 1.7"
|
||||
gem "factory_bot_rails", "~> 4.10"
|
||||
gem "factory_bot_rails", "~> 4.11"
|
||||
gem "fake_stripe", "~> 0.1"
|
||||
gem "launchy", "~> 2.4"
|
||||
gem "pundit-matchers", "~> 1.6"
|
||||
|
|
|
|||
20
Gemfile.lock
20
Gemfile.lock
|
|
@ -263,10 +263,10 @@ GEM
|
|||
eventmachine (1.2.5)
|
||||
excon (0.60.0)
|
||||
execjs (2.7.0)
|
||||
factory_bot (4.10.0)
|
||||
factory_bot (4.11.0)
|
||||
activesupport (>= 3.0.0)
|
||||
factory_bot_rails (4.10.0)
|
||||
factory_bot (~> 4.10.0)
|
||||
factory_bot_rails (4.11.0)
|
||||
factory_bot (~> 4.11.0)
|
||||
railties (>= 3.0.0)
|
||||
fake_stripe (0.1.0)
|
||||
capybara
|
||||
|
|
@ -499,7 +499,7 @@ GEM
|
|||
httparty (0.16.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
httpclient (2.8.3)
|
||||
i18n (1.0.1)
|
||||
i18n (1.1.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
ice_nine (0.11.2)
|
||||
inflecto (0.0.2)
|
||||
|
|
@ -643,7 +643,7 @@ GEM
|
|||
rack
|
||||
rack-proxy (0.6.4)
|
||||
rack
|
||||
rack-test (1.0.0)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rack-timeout (0.5.1)
|
||||
rails (5.1.6)
|
||||
|
|
@ -740,10 +740,10 @@ GEM
|
|||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||
rubocop-rspec (1.27.0)
|
||||
rubocop (>= 0.56.0)
|
||||
rubocop-rspec (1.28.0)
|
||||
rubocop (>= 0.58.0)
|
||||
ruby-prof (0.17.0)
|
||||
ruby-progressbar (1.9.0)
|
||||
ruby-progressbar (1.10.0)
|
||||
ruby_dep (1.5.0)
|
||||
rubyzip (1.2.1)
|
||||
s3_direct_upload (0.1.7)
|
||||
|
|
@ -946,7 +946,7 @@ DEPENDENCIES
|
|||
draper (~> 3.0)
|
||||
email_validator (~> 1.6)
|
||||
envied (~> 0.9)
|
||||
factory_bot_rails (~> 4.10)
|
||||
factory_bot_rails (~> 4.11)
|
||||
fake_stripe (~> 0.1)
|
||||
faker!
|
||||
fastly (~> 1.13)
|
||||
|
|
@ -1043,4 +1043,4 @@ RUBY VERSION
|
|||
ruby 2.5.1p57
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.3
|
||||
1.16.4
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
FactoryBot.define do
|
||||
factory :article do
|
||||
transient do
|
||||
title Faker::Book.title
|
||||
published true
|
||||
date "01/01/2015"
|
||||
tags Faker::Hipster.words(4).join(", ")
|
||||
canonical_url Faker::Internet.url
|
||||
with_canonical_url false
|
||||
with_date false
|
||||
with_tags true
|
||||
with_hr_issue false
|
||||
with_tweet_tag false
|
||||
with_title true
|
||||
title { Faker::Book.title }
|
||||
published { true }
|
||||
date { "01/01/2015" }
|
||||
tags { Faker::Hipster.words(4).join(", ") }
|
||||
canonical_url { Faker::Internet.url }
|
||||
with_canonical_url { false }
|
||||
with_date { false }
|
||||
with_tags { true }
|
||||
with_hr_issue { false }
|
||||
with_tweet_tag { false }
|
||||
with_title { true }
|
||||
end
|
||||
user
|
||||
description { Faker::Hipster.paragraph(1)[0..100] }
|
||||
main_image { Faker::Avatar.image }
|
||||
language "en"
|
||||
language { "en" }
|
||||
body_markdown do
|
||||
<<~HEREDOC
|
||||
---
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ FactoryBot.define do
|
|||
user
|
||||
badge
|
||||
rewarder { user }
|
||||
rewarding_context_message_markdown "Hello [Yoho](/hey)"
|
||||
rewarding_context_message_markdown { "Hello [Yoho](/hey)" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :block do
|
||||
input_html { Faker::Hipster.paragraph(1) }
|
||||
input_css "body {color:red}"
|
||||
input_css { "body {color:red}" }
|
||||
input_javascript { Faker::Hipster.paragraph(1) }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
FactoryBot.define do
|
||||
factory :broadcast do
|
||||
sent false
|
||||
sent { false }
|
||||
end
|
||||
|
||||
trait :onboarding do
|
||||
title "Welcome Notification"
|
||||
type_of "Onboarding"
|
||||
processed_html "Welcome! Introduce yourself in our <a href='/welcome'>welcome thread!</a>"
|
||||
title { "Welcome Notification" }
|
||||
type_of { "Onboarding" }
|
||||
processed_html { "Welcome! Introduce yourself in our <a href='/welcome'>welcome thread!</a>" }
|
||||
end
|
||||
|
||||
trait :sent do
|
||||
sent true
|
||||
sent { true }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
FactoryBot.define do
|
||||
factory :chat_channel do
|
||||
channel_type "open"
|
||||
channel_type { "open" }
|
||||
slug { rand(10000000000).to_s }
|
||||
end
|
||||
|
||||
trait :workshop do
|
||||
channel_name "Workshop"
|
||||
channel_name { "Workshop" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ FactoryBot.define do
|
|||
user
|
||||
body_markdown { Faker::Hipster.paragraph(1) }
|
||||
commentable_id { rand(1000) }
|
||||
commentable_type "Article"
|
||||
commentable_type { "Article" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :display_ad do
|
||||
placement_area "sidebar"
|
||||
body_markdown "Hello _hey_ Hey hey"
|
||||
placement_area { "sidebar" }
|
||||
body_markdown { "Hello _hey_ Hey hey" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ FactoryBot.define do
|
|||
description_markdown { Faker::Hipster.paragraph(2) }
|
||||
starts_at { Time.now }
|
||||
ends_at { Time.now + 3660 }
|
||||
category "AMA"
|
||||
category { "AMA" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :feedback_message do
|
||||
transient do
|
||||
reporter_id 1
|
||||
reporter_id { 1 }
|
||||
end
|
||||
|
||||
after(:create) do |feedback_message, evaluator|
|
||||
|
|
@ -10,15 +10,15 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
trait :abuse_report do
|
||||
feedback_type "abuse-reports"
|
||||
message "this is spam"
|
||||
category "spam"
|
||||
reported_url "https://dev.to"
|
||||
feedback_type { "abuse-reports" }
|
||||
message { "this is spam" }
|
||||
category { "spam" }
|
||||
reported_url { "https://dev.to" }
|
||||
end
|
||||
|
||||
trait :bug_report do
|
||||
feedback_type "bug-reports"
|
||||
message "i clicked something and this happened"
|
||||
category "bugs"
|
||||
feedback_type { "bug-reports" }
|
||||
message { "i clicked something and this happened" }
|
||||
category { "bugs" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ FactoryBot.define do
|
|||
watchers_count { rand(100000) }
|
||||
github_id_code { rand(100000) }
|
||||
stargazers_count { rand(100000) }
|
||||
featured true
|
||||
fork false
|
||||
featured { true }
|
||||
fork { false }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :identity do
|
||||
provider "github"
|
||||
provider { "github" }
|
||||
uid { rand(100000) }
|
||||
token { rand(100000) }
|
||||
secret { rand(100000) }
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ FactoryBot.define do
|
|||
factory :mention do
|
||||
user
|
||||
mentionable_id { rand(1000) }
|
||||
mentionable_type "Comment"
|
||||
mentionable_type { "Comment" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
FactoryBot.define do
|
||||
factory :notification do
|
||||
sent false
|
||||
sent { false }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ FactoryBot.define do
|
|||
factory :reaction do
|
||||
reactable_id { rand(10000) }
|
||||
user_id { rand(10000) }
|
||||
reactable_type "Article"
|
||||
category "like"
|
||||
reactable_type { "Article" }
|
||||
category { "like" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :tag do
|
||||
name { rand(10000).to_s }
|
||||
supported true
|
||||
supported { true }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ FactoryBot.define do
|
|||
summary { Faker::Lorem.paragraph[0..rand(190)] }
|
||||
website_url { Faker::Internet.url }
|
||||
confirmed_at { Time.now }
|
||||
saw_onboarding true
|
||||
signup_cta_variant "navbar_basic"
|
||||
email_digest_periodic false
|
||||
saw_onboarding { true }
|
||||
signup_cta_variant { "navbar_basic" }
|
||||
email_digest_periodic { false }
|
||||
|
||||
trait :super_admin do
|
||||
after(:build) { |user| user.add_role(:super_admin) }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue