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