remove unused mutation and test for it
This commit is contained in:
parent
aa56147322
commit
cda298c822
@ -83,10 +83,6 @@ const unmuteDomain = (store, domain) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const mutations = {
|
export const mutations = {
|
||||||
setMuted (state, { user: { id }, muted }) {
|
|
||||||
const user = state.usersObject[id]
|
|
||||||
set(user, 'muted', muted)
|
|
||||||
},
|
|
||||||
tagUser (state, { user: { id }, tag }) {
|
tagUser (state, { user: { id }, tag }) {
|
||||||
const user = state.usersObject[id]
|
const user = state.usersObject[id]
|
||||||
const tags = user.tags || []
|
const tags = user.tags || []
|
||||||
|
@ -73,15 +73,6 @@ export const parseUser = (data) => {
|
|||||||
output.background_image = data.pleroma.background_image
|
output.background_image = data.pleroma.background_image
|
||||||
output.token = data.pleroma.chat_token
|
output.token = data.pleroma.chat_token
|
||||||
|
|
||||||
if (relationship && !relationship) {
|
|
||||||
output.follows_you = relationship.followed_by
|
|
||||||
output.requested = relationship.requested
|
|
||||||
output.following = relationship.following
|
|
||||||
output.statusnet_blocking = relationship.blocking
|
|
||||||
output.muted = relationship.muting
|
|
||||||
output.showing_reblogs = relationship.showing_reblogs
|
|
||||||
output.subscribed = relationship.subscribing
|
|
||||||
}
|
|
||||||
if (relationship) {
|
if (relationship) {
|
||||||
output.relationship = relationship
|
output.relationship = relationship
|
||||||
}
|
}
|
||||||
|
@ -18,20 +18,6 @@ describe('The users module', () => {
|
|||||||
expect(state.users).to.eql([user])
|
expect(state.users).to.eql([user])
|
||||||
expect(state.users[0].name).to.eql('Dude')
|
expect(state.users[0].name).to.eql('Dude')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('sets a mute bit on users', () => {
|
|
||||||
const state = cloneDeep(defaultState)
|
|
||||||
const user = { id: '1', name: 'Guy' }
|
|
||||||
|
|
||||||
mutations.addNewUsers(state, [user])
|
|
||||||
mutations.setMuted(state, { user, muted: true })
|
|
||||||
|
|
||||||
expect(user.muted).to.eql(true)
|
|
||||||
|
|
||||||
mutations.setMuted(state, { user, muted: false })
|
|
||||||
|
|
||||||
expect(user.muted).to.eql(false)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('findUser', () => {
|
describe('findUser', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user