Migrated tagDeleted action to payload

This commit is contained in:
Alejandro Celaya
2022-11-07 22:22:44 +01:00
parent dbb08a6ce0
commit 22b3794154
4 changed files with 7 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ describe('tagDeleteReducer', () => {
it('returns action based on provided params', () =>
expect(tagDeleted('foo')).toEqual({
type: TAG_DELETED,
tag: 'foo',
payload: 'foo',
}));
});

View File

@@ -48,7 +48,7 @@ describe('tagsListReducer', () => {
const tag = 'foo';
const expectedTags = ['bar', 'baz'];
expect(reducer(state({ tags, filteredTags: tags }), { type: TAG_DELETED, tag } as any)).toEqual({
expect(reducer(state({ tags, filteredTags: tags }), { type: TAG_DELETED, payload: tag } as any)).toEqual({
tags: expectedTags,
filteredTags: expectedTags,
});