Skip to content

Commit

Permalink
tests: Fix routeIdValidator.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mmelko committed Nov 29, 2024
1 parent 0d5946e commit 050d994
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ui/src/components/InlineEdit/routeIdValidator.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ValidationStatus } from '../../models';
import { CamelRouteResource } from '../../models/camel';
import { camelRouteJson } from '../../stubs';
import { camelRouteJson, camelRouteYaml } from '../../stubs';
import { RouteIdValidator } from './routeIdValidator';

describe('routeIdValidator', () => {
Expand All @@ -18,7 +18,7 @@ describe('routeIdValidator', () => {
});

it('should return sucess if the name is unique', () => {
const resource = new CamelRouteResource(camelRouteJson);
const resource = new CamelRouteResource(camelRouteYaml);
const visualEntities = resource.getVisualEntities();
jest.spyOn(visualEntities[0], 'getId').mockReturnValue('flow-1234');

Expand All @@ -28,7 +28,7 @@ describe('routeIdValidator', () => {
});

it('should return an error if the name is not unique', () => {
const resource = new CamelRouteResource(camelRouteJson);
const resource = new CamelRouteResource(camelRouteYaml);
const visualEntities = resource.getVisualEntities();
jest.spyOn(visualEntities[0], 'getId').mockReturnValue('flow-1234');

Expand All @@ -39,7 +39,7 @@ describe('routeIdValidator', () => {
});

it('should return an error if the name is not a valid URI', () => {
const resource = new CamelRouteResource(camelRouteJson);
const resource = new CamelRouteResource(camelRouteYaml);
const visualEntities = resource.getVisualEntities();
jest.spyOn(visualEntities[0], 'getId').mockReturnValue('flow-1234');

Expand All @@ -50,7 +50,7 @@ describe('routeIdValidator', () => {
});

it('should return an error if the name is not unique neither a valid URI', () => {
const resource = new CamelRouteResource(camelRouteJson);
const resource = new CamelRouteResource(camelRouteYaml);
const visualEntities = resource.getVisualEntities();
jest.spyOn(visualEntities[0], 'getId').mockReturnValue('The amazing Route');

Expand Down

0 comments on commit 050d994

Please sign in to comment.