2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-03-06 15:51:08 +01:00
|
|
|
describe 'users/sessions/new', type: :view do
|
2016-05-26 15:59:50 +02:00
|
|
|
let(:dossier) { create :dossier }
|
|
|
|
|
|
|
|
before(:each) do
|
|
|
|
allow(view).to receive(:devise_mapping).and_return(Devise.mappings[:user])
|
2022-12-20 17:51:36 +01:00
|
|
|
allow(view).to receive(:resource).and_return(User.new)
|
2016-05-26 15:59:50 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
before do
|
|
|
|
assign(:user, User.new)
|
2019-01-08 08:20:49 +01:00
|
|
|
render
|
2016-05-26 15:59:50 +02:00
|
|
|
end
|
|
|
|
|
2019-01-08 08:20:49 +01:00
|
|
|
it 'renders' do
|
2023-06-28 10:24:37 +02:00
|
|
|
expect(rendered).to have_field('Adresse électronique')
|
2019-01-08 08:20:49 +01:00
|
|
|
expect(rendered).to have_field('Mot de passe')
|
|
|
|
expect(rendered).to have_button('Se connecter')
|
2016-05-26 15:59:50 +02:00
|
|
|
end
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|