Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/concerto-core/test/modelmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,11 @@ concept Bar {

it('should fail using bad URL and default model file loader', () => {

sandbox.stub(global, 'fetch').resolves({
ok: false,
status: 404
});

// disable validation, we are using an external model
modelManager.addCTOModel(`namespace org.acme@1.0.0
import org.external@1.0.0.Foo from github://external.cto
Expand All @@ -724,7 +729,7 @@ concept Bar {
modelManager.getModelFile('org.acme@1.0.0').should.not.be.null;

// import all external models
return modelManager.updateExternalModels().should.be.rejectedWith(Error, 'Failed to load model file. Job: github://external.cto Details: Error: HTTP request failed with status: 400');
return modelManager.updateExternalModels().should.be.rejectedWith(Error, 'Failed to load model file. Job: github://external.cto Details: Error: HTTP request failed with status: 404');
});

it('should fail using bad protocol and default model file loader', () => {
Expand Down