Skip to content

Commit

Permalink
- Tests to update patterns instead of exact matches
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Jan 28, 2025
1 parent 6adf859 commit 5a2421d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Tests to update patterns instead of exact matches
- Refactored to `cbMockData` namespace

## [3.7.0] => 2024-MAY-09
Expand Down
3 changes: 2 additions & 1 deletion test-harness/tests/specs/MockDataTest.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ component extends="coldbox.system.testing.BaseTestCase" appMapping="root" {

it( "can generate ssn", function(){
var r = cbMockData.mock( ssn = "ssn" );
expect( r[ 1 ].ssn ).toBeSSN();
// Expect to match the pattern xxx-xx-xxxx, safer since it's mock data
expect( r[ 1 ].ssn ).toMatch( "^\d{3}-\d{2}-\d{4}$" );
} );

it( "can generate telephones", function(){
Expand Down

0 comments on commit 5a2421d

Please sign in to comment.