Skip to content

Commit

Permalink
fix: change compare fieldfs validation test
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanguinho committed Jun 4, 2020
1 parent e1ebaaf commit c6e4022
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const makeSut = (field: string, fieldToCompare: string): CompareFieldsValidation

describe('CompareFieldsValidation', () => {
test('Should return error if compare is invalid', () => {
const field = faker.database.column()
const fieldToCompare = faker.database.column()
const field = 'any_field'
const fieldToCompare = 'other_field'
const sut = makeSut(field, fieldToCompare)
const error = sut.validate({
[field]: 'any_value',
Expand All @@ -17,8 +17,8 @@ describe('CompareFieldsValidation', () => {
})

test('Should return falsy if compare is valid', () => {
const field = faker.database.column()
const fieldToCompare = faker.database.column()
const field = 'any_field'
const fieldToCompare = 'other_field'
const value = faker.random.word()
const sut = makeSut(field, fieldToCompare)
const error = sut.validate({
Expand Down

0 comments on commit c6e4022

Please sign in to comment.