Add tests for `Admin::DashboardController`

This commit is contained in:
Andreas Nedbal 2022-11-20 19:35:11 +01:00 committed by Andreas Nedbal
parent c464e80e45
commit 930e16bbda
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# frozen_string_literal: true
require "rails_helper"
describe Admin::DashboardController, type: :controller do
describe "#index" do
subject { get :index }
context "user signed in" do
let(:user) { FactoryBot.create(:user, roles: [:administrator]) }
before { sign_in user }
it "shows the index page" do
subject
expect(response).to have_rendered(:index)
end
end
end
end