mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-29 03:11:48 +01:00
Add test for Settings::DataController#index
This commit is contained in:
parent
7221762478
commit
f7a56fa58e
1 changed files with 20 additions and 0 deletions
20
spec/controllers/settings/data_controller_spec.rb
Normal file
20
spec/controllers/settings/data_controller_spec.rb
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "rails_helper"
|
||||||
|
|
||||||
|
describe Settings::DataController, type: :controller do
|
||||||
|
describe "#index" do
|
||||||
|
subject { get :index }
|
||||||
|
|
||||||
|
context "user signed in" do
|
||||||
|
let(:user) { FactoryBot.create(:user) }
|
||||||
|
|
||||||
|
before { sign_in user }
|
||||||
|
|
||||||
|
it "shows the index page" do
|
||||||
|
subject
|
||||||
|
expect(response).to have_rendered(:index)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue