test/test_helper.rb
# rubocop:disable Metrics/MethodLength
# Note: In many tests we use "password" as the password.
# Users can (no longer) create accounts with this too-easy password.
# Using "password" helps test that users can log in to their
# existing accounts, even if we make the password rules harsher later.
disable Metrics/MethodLength
Note: In many tests we use "password" as the password.
Users can (no longer) create accounts with this too-easy password.
Using "password" helps test that users can log in to their
existing accounts, even if we make the password rules harsher later.
disable Metrics / MethodLength Note : In many tests we use " password " as the password . Users can ( no longer ) create accounts with this too - easy password . Using " password " helps test that users can log in to their existing accounts even if we make the password rules harsher later .
def log_in_as(
      user, password: 'password', provider: 'local', remember_me: '1',
      make_old: false
    )
      time_last_used = Time.now.utc
      post "#{login_path}#{'?make_old=true' if make_old}", params: {
        session: {
          email:  user.email, password: password,
          provider: provider, remember_me: remember_me,
          time_last_used: time_last_used
        }
      }
    end
def log_in_as ( user , password : 'password' , provider : 'local' , remember_me : '1' , make_old : false ) time_last_used = Time . now . utc post "#{login_path}#{'?make_old=true' if make_old}" , params : { session : { email : user . email , password : password , provider : provider , remember_me : remember_me , time_last_used : time_last_used } } end
rubocop:disable Metrics/MethodLength
Note: In many tests we use "password" as the password.
rubocop : disable Metrics / MethodLength Note : In many tests we use " password " as the password .
# This is based on "Ruby on Rails Tutorial" by Michael Hargle, chapter 8, # https://www.railstutorial.org/book
user
<not_specific>
password
<not_specific>
provider
<not_specific>
remember_me
<not_specific>
make_old
<not_specific>