Retrospring/spec/controllers/about_controller_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
593 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require "rails_helper"
describe AboutController, type: :controller do
describe "#about" do
subject { get :about }
2022-07-18 13:27:31 -07:00
before(:each) do
FactoryBot.create(:user, { confirmed_at: Time.current, answered_count: 1 })
FactoryBot.create(:user, { confirmed_at: Time.current, answered_count: 1 }).ban
FactoryBot.create(:user, { confirmed_at: Time.current })
FactoryBot.create(:user, { confirmed_at: Time.current }).ban
2022-07-18 13:27:31 -07:00
end
it "shows the correct user count" do
subject
expect(assigns(:users)).to eq(1)
end
end
end