Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indentation #13001

Merged
merged 1 commit into from
May 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,29 +82,29 @@ class TestingValidationSpec extends Specification implements DomainUnitTest<Pers
given:
def person = new Person(name: 'Jeff', age: 42, email: '[email protected]')

when:
person.properties = [age: 'some string', name: 'Jeff Scott Brown', email: 'abcdefgh']
when:
person.properties = [age: 'some string', name: 'Jeff Scott Brown', email: 'abcdefgh']

then:
1 == person.errors.errorCount
then:
1 == person.errors.errorCount

when:
def ageError = person.errors.getFieldError('age')
when:
def ageError = person.errors.getFieldError('age')

then:
'some string' == ageError.rejectedValue
then:
'some string' == ageError.rejectedValue

when:
person.validate()
def errorCount = person.errors.errorCount
ageError = person.errors.getFieldError('age')
def emailError = person.errors.getFieldError('email')
when:
person.validate()
def errorCount = person.errors.errorCount
ageError = person.errors.getFieldError('age')
def emailError = person.errors.getFieldError('email')

then:
errorCount == 2
'typeMismatch' in ageError.codes
'person.email.email.error' in emailError.codes
'some string' == ageError.rejectedValue
then:
errorCount == 2
'typeMismatch' in ageError.codes
'person.email.email.error' in emailError.codes
'some string' == ageError.rejectedValue
}
}

Expand Down