From b5c844f28e175fdc8813114cc9fe55903443fa82 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Fri, 27 Sep 2024 14:45:12 -0500 Subject: [PATCH] Update factory bot to factory bot 5 (#371) * update factory bot * update mention spec to have an associated comment on mention creation * Update Gemfile.next.lock * update mention_spec.rb typo * remove typo --- Gemfile | 2 +- Gemfile.lock | 14 +++++++------- Gemfile.next.lock | 12 ++++++------ spec/models/mention_spec.rb | 5 ++++- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index 2e8a30ab..eaf5afda 100644 --- a/Gemfile +++ b/Gemfile @@ -32,7 +32,7 @@ gem 'zoo_stream', '~> 1.0' group :test, :development do gem 'benchmark-ips' - gem 'factory_bot_rails', '~> 4.11.1' + gem 'factory_bot_rails', '~> 5.0' gem 'ffi', '1.16.3' gem 'guard' gem 'guard-rspec' diff --git a/Gemfile.lock b/Gemfile.lock index 62f17986..253381bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,11 +83,11 @@ GEM erubi (1.13.0) et-orbi (1.2.11) tzinfo - factory_bot (4.11.1) - activesupport (>= 3.0.0) - factory_bot_rails (4.11.1) - factory_bot (~> 4.11.1) - railties (>= 3.0.0) + factory_bot (5.2.0) + activesupport (>= 4.2.0) + factory_bot_rails (5.2.0) + factory_bot (~> 5.2.0) + railties (>= 4.2.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -139,7 +139,7 @@ GEM http-accept (1.7.0) http-cookie (1.0.6) domain_name (~> 0.5) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) its-it (1.3.0) jmespath (1.6.2) @@ -368,7 +368,7 @@ DEPENDENCIES aws-sdk (~> 2.3.7) benchmark-ips codeclimate-test-reporter (~> 0.5) - factory_bot_rails (~> 4.11.1) + factory_bot_rails (~> 5.0) faraday faraday_middleware ffi (= 1.16.3) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 16f22aa6..1a4b7859 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -83,11 +83,11 @@ GEM erubi (1.13.0) et-orbi (1.2.11) tzinfo - factory_bot (4.11.1) - activesupport (>= 3.0.0) - factory_bot_rails (4.11.1) - factory_bot (~> 4.11.1) - railties (>= 3.0.0) + factory_bot (5.2.0) + activesupport (>= 4.2.0) + factory_bot_rails (5.2.0) + factory_bot (~> 5.2.0) + railties (>= 4.2.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -368,7 +368,7 @@ DEPENDENCIES aws-sdk (~> 2.3.7) benchmark-ips codeclimate-test-reporter (~> 0.5) - factory_bot_rails (~> 4.11.1) + factory_bot_rails (~> 5.0) faraday faraday_middleware ffi (= 1.16.3) diff --git a/spec/models/mention_spec.rb b/spec/models/mention_spec.rb index 279ac419..eb64676c 100644 --- a/spec/models/mention_spec.rb +++ b/spec/models/mention_spec.rb @@ -30,7 +30,10 @@ describe '#notify_later' do it 'should queue the notification' do - mention = build :mention, mentionable: focus + project_board = create :board, section: "project-#{ focus.project.id}" + project_discussion = create :discussion, board: project_board + project_comment = create :comment, discussion: project_discussion + mention = build :mention, mentionable: focus, comment: project_comment expect(MentionWorker).to receive(:perform_async) mention.save! end