Skip to content

Commit 0047eca

Browse files
committed
update assertions in EditTitleDescriptionModa
1 parent 5b7c722 commit 0047eca

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

contentcuration/contentcuration/frontend/channelEdit/components/QuickEditModal/__tests__/EditTitleDescriptionModal.spec.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ describe('EditTitleDescriptionModal', () => {
3333
},
3434
},
3535
}),
36-
propsData: {
37-
nodeId,
38-
},
36+
propsData: { nodeId },
3937
});
4038

4139
updateContentNode = jest.spyOn(wrapper.vm, 'updateContentNode').mockImplementation(() => {});
@@ -67,11 +65,13 @@ describe('EditTitleDescriptionModal', () => {
6765

6866
modal.vm.$emit('submit');
6967

70-
expect(updateContentNode).toHaveBeenCalledWith({
71-
id: nodeId,
72-
title: newTitle,
73-
description: newDescription,
74-
});
68+
expect(updateContentNode).toHaveBeenCalledWith(
69+
expect.objectContaining({
70+
id: nodeId,
71+
title: newTitle,
72+
description: newDescription,
73+
}),
74+
);
7575
});
7676

7777
it('should let update even if description is empty', () => {
@@ -81,11 +81,13 @@ describe('EditTitleDescriptionModal', () => {
8181

8282
modal.vm.$emit('submit');
8383

84-
expect(updateContentNode).toHaveBeenCalledWith({
85-
id: nodeId,
86-
title: newTitle,
87-
description: '',
88-
});
84+
expect(updateContentNode).toHaveBeenCalledWith(
85+
expect.objectContaining({
86+
id: nodeId,
87+
title: newTitle,
88+
description: '',
89+
}),
90+
);
8991
});
9092

9193
it('should validate title on blur', async () => {

0 commit comments

Comments
 (0)