New Routes: add new_user/user_controller
This commit is contained in:
parent
8f40261b68
commit
081ed90968
2 changed files with 19 additions and 0 deletions
5
app/controllers/new_user/user_controller.rb
Normal file
5
app/controllers/new_user/user_controller.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
module NewUser
|
||||||
|
class UserController < ApplicationController
|
||||||
|
before_action :authenticate_user!
|
||||||
|
end
|
||||||
|
end
|
14
spec/controllers/new_user/user_controller_spec.rb
Normal file
14
spec/controllers/new_user/user_controller_spec.rb
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe NewUser::UserController, type: :controller do
|
||||||
|
describe 'before actions: authenticate_gestionnaire!' do
|
||||||
|
it 'is present' do
|
||||||
|
before_actions = NewUser::UserController
|
||||||
|
._process_action_callbacks
|
||||||
|
.find_all{|process_action_callbacks| process_action_callbacks.kind == :before}
|
||||||
|
.map(&:filter)
|
||||||
|
|
||||||
|
expect(before_actions).to include(:authenticate_user!)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue