Skip to content

Commit

Permalink
Fix rubocop and update default user password
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrett committed Nov 8, 2023
1 parent ccef372 commit 0852994
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions db/seeds/users.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
[email protected]:
password: <%= ENV.fetch('USER_PASSWORD', 'StrongPassword12!@') %>
password: <%= ENV.fetch('USER_PASSWORD', 'Str0ngPa$$word') %>
terms_and_conditions_agreed_at: <%= 1.minute.ago %>

[email protected]:
password: <%= ENV.fetch('USER_PASSWORD', 'StrongPassword12!@') %>
password: <%= ENV.fetch('USER_PASSWORD', 'Str0ngPa$$w0rd12') %>
terms_and_conditions_agreed_at: <%= 1.minute.ago %>
confirmed_at: <%= 1.minute.ago %>

[email protected]:
password: <%= ENV.fetch('USER_PASSWORD', 'StrongPassword12!@') %>
password: <%= ENV.fetch('USER_PASSWORD', 'Str0ngPa$$w0rd') %>
terms_and_conditions_agreed_at: <%= 1.minute.ago %>
confirmed_at: <%= 1.minute.ago %>
first_name: Demo
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/eyfs.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace :eyfs do
unless User.find_by(email: "#{bot_token}@example.com")
User.create!(
email: "#{bot_token}@example.com",
password: ENV.fetch('USER_PASSWORD', 'StrongPassword12!@'),
password: ENV.fetch('USER_PASSWORD', 'Str0ngPa$$w0rd'),
confirmed_at: Time.zone.now,
terms_and_conditions_agreed_at: Time.zone.now,
first_name: 'Bot',
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/user_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{
password: 'NewPassword12!@',
confirm_password: 'NewPassword12!@',
current_password: 'StrongPassword12!@',
current_password: 'Str0ngPa$$w0rd',
}
end

Expand Down Expand Up @@ -90,7 +90,7 @@
{
password: '',
confirm_password: '',
current_password: 'StrongPassword12!@',
current_password: 'Str0ngPa$$w0rd',
}
end

Expand Down
2 changes: 1 addition & 1 deletion spec/factories/users.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FactoryBot.define do
factory :user do
email { Faker::Internet.email }
password { 'StrongPassword12!@' }
password { 'Str0ngPa$$w0rd' }
terms_and_conditions_agreed_at { Date.new(2000, 0o1, 0o1) }

trait :confirmed do
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/seed_snippets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
subject(:locales) { described_class.new.call }

it 'converts all translations' do
expect(locales.count).to be 181
expect(locales.count).to be 181
end

it 'dot separated key -> Page::Resource#name' do
Expand Down
4 changes: 2 additions & 2 deletions spec/system/registered_user/changing_password_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
RSpec.describe 'Registered user changing password', type: :system do
subject(:user) { create :user, :registered, created_at: 1.month.ago }

let(:password) { 'StrongPassword12!@' }
let(:password) { 'Str0ngPa$$w0rd' }

include_context 'with user'

before do
visit '/my-account/edit-password'
fill_in 'Enter your current password', with: 'StrongPassword12!@'
fill_in 'Enter your current password', with: 'Str0ngPa$$w0rd'
fill_in 'Create a new password', with: password
fill_in 'Confirm password', with: password
end
Expand Down
2 changes: 1 addition & 1 deletion spec/system/sign_in_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe 'Sign in' do
let(:email_address) { user.email }
let(:password) { 'StrongPassword12!@' }
let(:password) { 'Str0ngPa$$w0rd' }

before do
visit '/users/sign-in'
Expand Down
4 changes: 2 additions & 2 deletions ui/pages/sign_in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class SignIn < Base
# Authenticate using email and password
#
# @param email [String] login email address (default: [email protected])
# @param password [String] login password (default: StrongPassword12!@)
# @param password [String] login password (default: Str0ngPa$$w0rd)
def with_email_and_password(email = nil, password = nil)
wait_until_header_visible

email ||= '[email protected]'
password ||= ENV.fetch('USER_PASSWORD', 'StrongPassword12!@')
password ||= ENV.fetch('USER_PASSWORD', 'Str0ngPa$$w0rd')

email_field.set(email)
password_field.set(password)
Expand Down

0 comments on commit 0852994

Please sign in to comment.