Skip to content

Commit

Permalink
Test driver birthday custom getter methods
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejkang committed Sep 4, 2021
1 parent 680b5a0 commit 8414be8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/verification/domain/DriverBirthday.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ describe('DriverBirthday', () => {
expect(driverBirthdayUndefinedOrError.errorValue()).toBe(DRIVER_BIRTHDAY_SHOULD_BE_DEFINED);
expect(driverBirthdayWrongFormatOrError.errorValue()).toBe(DRIVER_BIRTHDAY_HAS_WRONG_FORMAT);
});

it('should return specific year, month and date', () => {
const driverBirthday = DriverBirthday.create('2000-01-01');

expect(driverBirthday.value.year).toEqual('2000');
expect(driverBirthday.value.month).toEqual('01');
expect(driverBirthday.value.date).toEqual('01');
});
});

0 comments on commit 8414be8

Please sign in to comment.