# 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

# 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 moderation/reports/index template" do
      subject
      expect(response).to render_template("moderation/reports/index")
    end
  end
end

Apply review suggestions from @nilsding
Apply review suggestions from @nilsding

Co-authored-by: Georg Gadinger <9e8f1a26fbf401b045347f083556ffd7c0b25a58@nilsding.org>