Don't access at user/sign_in/demi and gestionnaire/sign_in/demo on env production
This commit is contained in:
parent
0e1dac7d19
commit
c2983e08b6
4 changed files with 28 additions and 0 deletions
|
@ -8,6 +8,18 @@ describe Users::SessionsController, type: :controller do
|
|||
@request.env["devise.mapping"] = Devise.mappings[:user]
|
||||
end
|
||||
|
||||
describe '.demo' do
|
||||
context 'when server is on env production' do
|
||||
before do
|
||||
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("production"))
|
||||
end
|
||||
subject { get :demo }
|
||||
|
||||
it { expect(subject).to redirect_to root_path }
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
describe '.create' do
|
||||
it { expect(described_class).to be < Sessions::SessionsController }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue