mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Add base spec for Moderation::QuestionsController
This commit is contained in:
parent
f521b5f160
commit
9874ffac19
1 changed files with 20 additions and 0 deletions
20
spec/controllers/moderation/questions_controller_spec.rb
Normal file
20
spec/controllers/moderation/questions_controller_spec.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "rails_helper"
|
||||
|
||||
describe Moderation::QuestionsController, 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/questions/index template" do
|
||||
subject
|
||||
expect(response).to render_template("moderation/questions/index")
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue