From f8af42b16fbe0d436c8180d1e17a35c392b38138 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 3 Oct 2021 21:52:07 +0200 Subject: [PATCH] fix user creation in test case --- spec/controllers/static_controller_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/controllers/static_controller_spec.rb b/spec/controllers/static_controller_spec.rb index 02b08787..0a79ec39 100644 --- a/spec/controllers/static_controller_spec.rb +++ b/spec/controllers/static_controller_spec.rb @@ -7,10 +7,10 @@ describe StaticController, type: :controller do subject { get :about } before(:each) { - User.create(screen_name: 'very_valid_user', confirmed_at: Time.now, answered_count: 1, asked_count: 1) - User.create(screen_name: 'big_ben', permanently_banned: true) - User.create(screen_name: 'youre_mom', banned_until: Time.now + 10.days) - User.create(screen_name: 'silence_fox', confirmed_at: Time.now) + FactoryBot.create(:user, { confirmed_at: Time.now, answered_count: 1, asked_count: 1 }) + FactoryBot.create(:user, { permanently_banned: true }) + FactoryBot.create(:user, { banned_until: Time.now + 10.days }) + FactoryBot.create(:user, { confirmed_at: Time.now }) } it "shows the correct user count" do