demarches-normaliennes/spec/controllers/backoffice_controller_spec.rb
Xavier J 3e55d7ba3b - Delete routes 'users/dossiers/a_traiter - en_attente - termine' for user
- Add routes 'uses/dossiers/?liste=xxx' to reach at file lists for user
2015-12-02 18:03:52 +01:00

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