Retrospring/spec/controllers/moderation/questions_controller_spec.rb

23 lines
500 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require "rails_helper"
describe Moderation::QuestionsController, type: :controller do
let(:user) { FactoryBot.create :user, roles: ["moderator"] }
describe "#index" do
2022-08-20 19:25:17 -07:00
subject { get :index, params: }
2022-08-20 19:20:10 -07:00
let(:params) { { author_identifier: "test" } }
before do
sign_in user
end
it "renders the moderation/questions/index template" do
subject
expect(response).to render_template("moderation/questions/index")
end
end
end