Skip to content

Commit

Permalink
fix: webhook tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorreem committed Jan 21, 2025
1 parent e368baa commit cabc2e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webhooks/webhooks.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ describe('WebhooksService', () => {
storyblokUuid: mockCourseStoryblokResult.data.story.uuid,
status: STORYBLOK_STORY_STATUS_ENUM.PUBLISHED,
slug: mockCourseStoryblokResult.data.story.full_slug,
name: mockCourseStoryblokResult.data.story.name,
name: mockCourseStoryblokResult.data.story.content.name,
};

const course = (await service.handleStoryUpdated(body)) as CourseEntity;
Expand All @@ -442,7 +442,7 @@ describe('WebhooksService', () => {
expect(courseSaveRepoSpy).toHaveBeenCalledWith(expectedResponse);

expect(mockedServiceUserProfilesService.createMailchimpCourseMergeField).toHaveBeenCalledWith(
mockCourseStoryblokResult.data.story.name,
mockCourseStoryblokResult.data.story.content.name,
);
courseFindOneRepoSpy.mockClear();
courseSaveRepoSpy.mockClear();
Expand Down Expand Up @@ -536,7 +536,7 @@ describe('WebhooksService', () => {
const updatedMockResourceStoryblokResult = { ...mockResourceStoryblokResult };
const newName = 'New resource name';
const newSlug = 'resources/shorts/new-resource-name';
updatedMockResourceStoryblokResult.data.story.name = newName;
updatedMockResourceStoryblokResult.data.story.content.name = newName;
updatedMockResourceStoryblokResult.data.story.full_slug = newSlug;

// Mock StoryblokClient to return a resource story
Expand Down

0 comments on commit cabc2e6

Please sign in to comment.