aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/helpers
diff options
context:
space:
mode:
authorLuc Donnet2015-01-16 12:43:50 +0100
committerLuc Donnet2015-01-16 12:43:50 +0100
commit4ce59945a30c29a3347c145e57fa496d55de1bfb (patch)
tree82bcc5330f4228a1ee611774b935a4d50713f340 /spec/support/helpers
parent834f8c18bd62d5fa60d6ff32a1f5470e477fbbcd (diff)
downloadchouette-core-4ce59945a30c29a3347c145e57fa496d55de1bfb.tar.bz2
Add spec for devise and upgrade versions of devise views
Diffstat (limited to 'spec/support/helpers')
-rw-r--r--spec/support/helpers/session_helpers.rb21
1 files changed, 13 insertions, 8 deletions
diff --git a/spec/support/helpers/session_helpers.rb b/spec/support/helpers/session_helpers.rb
index 14f3747ba..b92c5f0a1 100644
--- a/spec/support/helpers/session_helpers.rb
+++ b/spec/support/helpers/session_helpers.rb
@@ -2,18 +2,23 @@ module Features
module SessionHelpers
def sign_up_with(email, password, confirmation)
visit new_user_session_path
- fill_in '#registration_new #user_email', with: email
- fill_in 'Password', with: password
- fill_in 'Password confirmation', :with => confirmation
- click_button 'Sign up'
+ within(".registration_new") do
+ fill_in 'user_organisation_attributes_name', with: "Cityway"
+ fill_in 'user_name', with: "User"
+ fill_in 'user_email', with: email
+ fill_in 'user_password', with: password
+ fill_in 'user_password_confirmation', :with => confirmation
+ end
+ click_button 'S\'inscrire'
end
def signin(email, password)
visit new_user_session_path
- # save_and_open_page
- fill_in '#session_new #user_email', with: email
- fill_in 'Password', with: password
- click_button 'Sign in'
+ within(".session_new") do
+ fill_in 'user_email', with: email
+ fill_in 'user_password', with: password
+ end
+ click_button 'Se connecter'
end
end
end