spec/lockout_spec.rb in rodauth-1.19.1 vs spec/lockout_spec.rb in rodauth-1.20.0

- old
+ new

@@ -46,11 +46,11 @@ click_button 'Login' click_button 'Request Account Unlock' email_link(/(\/unlock-account\?key=.+)$/).must_equal link visit link[0...-1] - page.find('#error_flash').text.must_equal 'No matching unlock account key' + page.find('#error_flash').text.must_equal "There was an error unlocking your account: invalid or expired unlock account key" visit link click_button 'Unlock Account' page.find('#notice_flash').text.must_equal 'Your account has been unlocked' page.body.must_include('Not Logged') @@ -210,11 +210,11 @@ r.rodauth [rodauth.logged_in? ? "Logged In" : "Not Logged"] end res = json_request('/unlock-account-request', :login=>'foo@example.com') - res.must_equal [401, {'error'=>"no matching login"}] + res.must_equal [401, {'error'=>"No matching login"}] res = json_login(:pass=>'1', :no_check=>true) res.must_equal [401, {'error'=>"There was an error logging in", "field-error"=>["password", "invalid password"]}] json_login @@ -229,17 +229,17 @@ res = json_login(:pass=>'1', :no_check=>true) res.must_equal [403, {'error'=>"This account is currently locked out and cannot be logged in to."}] end res = json_request('/unlock-account') - res.must_equal [401, {'error'=>"No matching unlock account key"}] + res.must_equal [401, {'error'=>"There was an error unlocking your account: invalid or expired unlock account key"}] res = json_request('/unlock-account-request', :login=>'foo@example.com') res.must_equal [200, {'success'=>"An email has been sent to you with a link to unlock your account"}] link = email_link(/key=.+$/) res = json_request('/unlock-account', :key=>link[4...-1]) - res.must_equal [401, {'error'=>"No matching unlock account key"}] + res.must_equal [401, {'error'=>"There was an error unlocking your account: invalid or expired unlock account key"}] res = json_request('/unlock-account', :key=>link[4..-1]) res.must_equal [200, {'success'=>"Your account has been unlocked"}] res = json_request.must_equal [200, ['Not Logged']]