Made user email case insensitive

This commit is contained in:
Godwin
2017-01-06 16:45:11 -08:00
parent 0616350fdf
commit cb016915e4
10 changed files with 144 additions and 148 deletions
+3 -3
View File
@@ -370,7 +370,7 @@ Then (/^in th(e|at) email I should see (.+)$/) do |a, value|
end
Then(/^(I )?confirm my account$/) do | a |
@my_account = User.find_by(:email => @last_email_entered)
@my_account = User.find_user(@last_email_entered)
@confirmation = EmailConfirmation.where(["user_id = ?", @my_account.id]).order("created_at DESC").first
visit "/confirm/#{@confirmation.token}"
end
@@ -458,7 +458,7 @@ Then (/^my registration (should( not)? be|is( not)?) (confirmed|completed?|paid)
end
Then (/^I am( not)? a user$/) do |state|
User.find_by(:email => @last_email_entered).
User.find_user(@last_email_entered).
send(state =~ / not/ ? 'should_not' : 'should', be)
end
@@ -481,7 +481,7 @@ Then (/^I am( not)? a member of (.+)$/) do |state, org_name|
end
Then (/^My (.+) should(not )? be (.+)$/) do |field, state, value|
User.find_by(:email => @last_email_entered).
User.find_user(@last_email_entered).
send(field.gsub(/\s/, '_')).
send(state =~ / not/ ? 'should_not' : 'should', eq(value))
end