Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 776a657

Browse files
committedDec 15, 2024
Update from PR review
1 parent a57aac3 commit 776a657

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎test/models/validatable_test.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# encoding: UTF-8
22
# frozen_string_literal: true
3-
require "test_helper"
3+
require 'test_helper'
44

55
class ValidatableTest < ActiveSupport::TestCase
6-
test 'should require email to be set' do
6+
test 'should require email to be set' do
77
user = new_user(email: nil)
88
assert user.invalid?
99
assert user.errors[:email]
@@ -176,7 +176,7 @@ class ValidatableTest < ActiveSupport::TestCase
176176

177177

178178
test "special character must be within defined special character set if it is custom" do
179-
with_password_requirement(:require_special, true) do
179+
with_password_requirement(:require_special, true) do
180180
with_password_requirement(:special_characters, '!') do
181181
user = new_user(password: 'password!', password_confirmation: 'password!')
182182
assert user.valid?
@@ -191,7 +191,6 @@ class ValidatableTest < ActiveSupport::TestCase
191191
def with_password_requirement(requirement, value)
192192
# Change the password requirement and restore it after the block is executed
193193
original_password_complexity= User.public_send("password_complexity")
194-
original_value = original_password_complexity[requirement]
195194

196195
updated_password_complexity = original_password_complexity.dup
197196
updated_password_complexity[requirement] = value

0 commit comments

Comments
 (0)
Please sign in to comment.