[TLC-254] mock config data service, get type in form builder service+test

This commit is contained in:
Kim Shepherd
2022-05-04 13:49:59 +12:00
parent fd0c8f409e
commit 5363ae1ac1
3 changed files with 16 additions and 2 deletions

View File

@@ -897,7 +897,7 @@ describe('FormBuilderService test suite', () => {
});
it(`should request the ${typeFieldProp} property and set value "dc_type"`, () => {
service.setTypeBindFieldFromConfig();
// This should have been called in the service constructor
expect(configSpy.findByPropertyName).toHaveBeenCalledTimes(1);
expect(configSpy.findByPropertyName).toHaveBeenCalledWith(typeFieldProp);
expect(service.getTypeField()).toEqual('dc_type');