mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
21 lines
428 B
Ruby
21 lines
428 B
Ruby
|
# 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
|