Add base spec for `Moderation::ReportsController`

This commit is contained in:
Andreas Nedbal 2022-08-20 21:18:25 +02:00 committed by Andreas Nedbal
parent 922799f123
commit bedd29f7e8
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# frozen_string_literal: true
require "rails_helper"
describe Moderation::ReportsController, type: :controller do
let(:user) { FactoryBot.create :user, roles: ["moderator"] }
describe "#index" do
subject { get :index }
before do
sign_in user
end
it "renders the user/questions template" do
subject
expect(response).to render_template("moderation/reports/index")
end
end
end