Retrospring/spec/controllers/moderation/questions_controller_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
496 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"] }
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" } }
before do
sign_in user
end
2022-08-21 03:58:58 -07:00
it "renders the moderation/questions/show template" do
subject
2022-08-21 03:58:58 -07:00
expect(response).to render_template("moderation/questions/show")
end
end
end