Skip to content

Commit

Permalink
Updated test to cover also column references
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarHawk committed Oct 17, 2024
1 parent 330d2a4 commit 6ef387f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion generators/liquibase/incremental-liquibase.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,16 @@ entity Customer {
);
runResult.assertNoFileContent(`${SERVER_MAIN_RES_DIR}config/liquibase/changelog/20200102000100_updated_entity_One.xml`, 'dropColumn');
});
it('should create the entity constraint update changelog', () => {
it('should create the entity constraint update changelog with fitting column names', () => {
runResult.assertFile([`${SERVER_MAIN_RES_DIR}config/liquibase/changelog/20200102000100_updated_entity_constraints_One.xml`]);
runResult.assertFileContent(
`${SERVER_MAIN_RES_DIR}config/liquibase/changelog/20200102000100_updated_entity_constraints_One.xml`,
'baseColumnNames="another_another_id"',
);
runResult.assertFileContent(
`${SERVER_MAIN_RES_DIR}config/liquibase/changelog/20200102000100_updated_entity_constraints_One.xml`,
'referencedColumnNames="another_id"',
);
});
it('should match snapshot', () => {
expect(runResult.getSnapshot('**/src/main/resources/config/liquibase/**')).toMatchSnapshot();
Expand Down

0 comments on commit 6ef387f

Please sign in to comment.