| @@ 88-108 (lines=21) @@ | ||
| 85 | }) |
|
| 86 | }) |
|
| 87 | ||
| 88 | describe('SAVE_EDITED_CONTENT', () => { |
|
| 89 | it('toSuccess should work corectly', function() { |
|
| 90 | const state = { |
|
| 91 | editedContent: { |
|
| 92 | id: 'test', |
|
| 93 | slug: 'test', |
|
| 94 | title: 'test', |
|
| 95 | brief: 'test', |
|
| 96 | time: 'test', |
|
| 97 | tag: ['test', 'test1'], |
|
| 98 | author: 'test', |
|
| 99 | content: 'test' |
|
| 100 | } |
|
| 101 | } |
|
| 102 | const action = { |
|
| 103 | type: toSuccess(SAVE_EDITED_CONTENT), |
|
| 104 | payload: {} |
|
| 105 | } |
|
| 106 | expect(postReducer(state, action)).toMatchSnapshot() |
|
| 107 | }) |
|
| 108 | }) |
|
| 109 | ||
| 110 | describe('EDIT_POST_TITLE', () => { |
|
| 111 | it('should work corectly', function() { |
|
| @@ 66-86 (lines=21) @@ | ||
| 63 | }) |
|
| 64 | }) |
|
| 65 | ||
| 66 | describe('CREATE_NEW_POST', () => { |
|
| 67 | it('toSuccess should work corectly', function() { |
|
| 68 | const state = { |
|
| 69 | editedContent: { |
|
| 70 | id: 'test', |
|
| 71 | slug: 'test', |
|
| 72 | title: 'test', |
|
| 73 | brief: 'test', |
|
| 74 | time: 'test', |
|
| 75 | tag: ['test', 'test1'], |
|
| 76 | author: 'test', |
|
| 77 | content: 'test' |
|
| 78 | } |
|
| 79 | } |
|
| 80 | const action = { |
|
| 81 | type: toSuccess(CREATE_NEW_POST), |
|
| 82 | payload: {} |
|
| 83 | } |
|
| 84 | expect(postReducer(state, action)).toMatchSnapshot() |
|
| 85 | }) |
|
| 86 | }) |
|
| 87 | ||
| 88 | describe('SAVE_EDITED_CONTENT', () => { |
|
| 89 | it('toSuccess should work corectly', function() { |
|