fix user creation in test case

This commit is contained in:
Andreas Nedbal 2021-10-03 21:52:07 +02:00
parent 85210589cb
commit f8af42b16f
1 changed files with 4 additions and 4 deletions

View File

@ -7,10 +7,10 @@ describe StaticController, type: :controller do
subject { get :about } subject { get :about }
before(:each) { before(:each) {
User.create(screen_name: 'very_valid_user', confirmed_at: Time.now, answered_count: 1, asked_count: 1) FactoryBot.create(:user, { confirmed_at: Time.now, answered_count: 1, asked_count: 1 })
User.create(screen_name: 'big_ben', permanently_banned: true) FactoryBot.create(:user, { permanently_banned: true })
User.create(screen_name: 'youre_mom', banned_until: Time.now + 10.days) FactoryBot.create(:user, { banned_until: Time.now + 10.days })
User.create(screen_name: 'silence_fox', confirmed_at: Time.now) FactoryBot.create(:user, { confirmed_at: Time.now })
} }
it "shows the correct user count" do it "shows the correct user count" do