demarches-normaliennes/spec/views/users/sessions/new.html.haml_spec.rb

22 lines
527 B
Ruby
Raw Normal View History

# frozen_string_literal: true
describe 'users/sessions/new', type: :view do
let(:dossier) { create :dossier }
before(:each) do
allow(view).to receive(:devise_mapping).and_return(Devise.mappings[:user])
allow(view).to receive(:resource).and_return(User.new)
end
before do
assign(:user, User.new)
render
end
it 'renders' do
2023-06-28 10:24:37 +02:00
expect(rendered).to have_field('Adresse électronique')
expect(rendered).to have_field('Mot de passe')
expect(rendered).to have_button('Se connecter')
end
2017-04-04 15:27:04 +02:00
end