diff --git a/Gemfile b/Gemfile
index 67c0e6b4ce04afd7d0767afdbb072efa5b1f5d50..460d161587de9629bfddbc5841b51507ead013cf 100644
--- a/Gemfile
+++ b/Gemfile
@@ -355,7 +355,7 @@ group :development, :test do
   gem 'fuubar', '~> 2.2.0'
 
   gem 'database_cleaner', '~> 1.7.0'
-  gem 'factory_bot_rails', '~> 4.8.2'
+  gem 'factory_bot_rails', '~> 5.1.0'
   gem 'rspec-rails', '~> 3.8.0'
   gem 'rspec-retry', '~> 0.6.1'
   gem 'rspec_profiling', '~> 0.0.5'
diff --git a/Gemfile.lock b/Gemfile.lock
index 4a2016c8a8b02a62ceb95821564840dd969b6e9f..c6828ecb2cd8bd2336db00075aca96773090f3d0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -254,7 +254,7 @@ GEM
       mail (~> 2.7)
     encryptor (3.0.0)
     equalizer (0.0.11)
-    erubi (1.8.0)
+    erubi (1.9.0)
     escape_utils (1.2.1)
     et-orbi (1.2.1)
       tzinfo
@@ -264,11 +264,11 @@ GEM
     expression_parser (0.9.0)
     extended-markdown-filter (0.6.0)
       html-pipeline (~> 2.0)
-    factory_bot (4.8.2)
-      activesupport (>= 3.0.0)
-    factory_bot_rails (4.8.2)
-      factory_bot (~> 4.8.2)
-      railties (>= 3.0.0)
+    factory_bot (5.1.0)
+      activesupport (>= 4.2.0)
+    factory_bot_rails (5.1.0)
+      factory_bot (~> 5.1.0)
+      railties (>= 4.2.0)
     faraday (0.12.2)
       multipart-post (>= 1.2, < 3)
     faraday-http-cache (2.0.0)
@@ -565,7 +565,7 @@ GEM
       activesupport (>= 4)
       railties (>= 4)
       request_store (~> 1.0)
-    loofah (2.2.3)
+    loofah (2.3.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
     mail (2.7.1)
@@ -783,7 +783,7 @@ GEM
       thor (>= 0.19.0, < 2.0)
     rainbow (3.0.0)
     raindrops (0.19.0)
-    rake (12.3.2)
+    rake (12.3.3)
     rb-fsevent (0.10.2)
     rb-inotify (0.9.10)
       ffi (>= 0.5.0, < 2)
@@ -1144,7 +1144,7 @@ DEPENDENCIES
   email_reply_trimmer (~> 0.1)
   email_spec (~> 2.2.0)
   escape_utils (~> 1.1)
-  factory_bot_rails (~> 4.8.2)
+  factory_bot_rails (~> 5.1.0)
   faraday (~> 0.12)
   faraday_middleware-aws-signers-v4
   fast_blank