Commit 6884daea authored by Nastassia Danilova's avatar Nastassia Danilova

fix updateUserStatus

parent 7e5493fb
Pipeline #30492 passed with stages
in 5 minutes and 31 seconds
......@@ -78,7 +78,10 @@ const updateUserStatus = (state, { userId, status }) => {
...emojifyStatus(status, {})
}])
} else {
newUser.statuses[statusIndex] = emojifyStatus(status, user.statuses[statusIndex])
newUser.statuses[statusIndex] = {
...user.statuses[statusIndex],
...emojifyStatus(status, user.statuses[statusIndex])
}
}
return {
...state,
......
......@@ -137,7 +137,7 @@ describe('User reducers', () => {
describe(`update user status`, () => {
it('should update user status', () => {
const status = { id: '2', content: 'content', spoiler_text: 'header' }
const status = { id: '2', content: 'content', spoiler_text: 'header', avatar: 'nd' }
const user = {
id: '1',
statuses: [status]
......
......@@ -554,7 +554,7 @@ describe('Status thunks', () => {
id: '1',
acct: 'nd',
statuses: [
{ id: '1', content: 'Status content', spoiler_text: '' }
{ id: '1', content: 'Status content', spoiler_text: '', reblogged: false }
]
}
}}
......@@ -589,6 +589,7 @@ describe('Status thunks', () => {
id: '1',
content: 'Status content',
spoiler_text: '',
reblogged: false,
favourited_by: favouritedByList,
reblogged_by: rebloggedByList,
reblogs_count: 2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment