3e55d7ba3b
- Add routes 'uses/dossiers/?liste=xxx' to reach at file lists for user
22 lines
No EOL
493 B
Ruby
22 lines
No EOL
493 B
Ruby
require 'spec_helper'
|
|
|
|
describe BackofficeController, type: :controller do
|
|
describe 'GET #index' do
|
|
context 'when gestionnaire is not connected'do
|
|
before do
|
|
get :index
|
|
end
|
|
|
|
it { expect(response).to redirect_to :new_gestionnaire_session }
|
|
end
|
|
|
|
context 'when gestionnaire is connected'do
|
|
before do
|
|
sign_in create(:gestionnaire)
|
|
get :index
|
|
end
|
|
|
|
it { expect(response).to redirect_to :backoffice_dossiers }
|
|
end
|
|
end
|
|
end |