aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/modules/users.spec.js
diff options
context:
space:
mode:
authorHJ <spam@hjkos.com>2019-01-22 17:46:08 +0000
committerHJ <spam@hjkos.com>2019-01-22 17:46:08 +0000
commit3a3cf1d48a67c82bb2c94cafb0150b1fa8e4de1a (patch)
tree5e39bb41c1e73191b2ff6222eee8720420f13dfd /test/unit/specs/modules/users.spec.js
parent7651290e2be72ed35d7582757251eb151fdce953 (diff)
parent92dedcd53e56562205e704eea2754f159eb9707d (diff)
Merge branch 'favorites' into 'develop'
Add Favorites TL to user profile, add some initial support for MastoAPI Closes #265 and #262 See merge request pleroma/pleroma-fe!462
Diffstat (limited to 'test/unit/specs/modules/users.spec.js')
-rw-r--r--test/unit/specs/modules/users.spec.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/specs/modules/users.spec.js b/test/unit/specs/modules/users.spec.js
index af60c9b3..b0f3c51e 100644
--- a/test/unit/specs/modules/users.spec.js
+++ b/test/unit/specs/modules/users.spec.js
@@ -6,8 +6,8 @@ describe('The users module', () => {
describe('mutations', () => {
it('adds new users to the set, merging in new information for old users', () => {
const state = cloneDeep(defaultState)
- const user = { id: 1, name: 'Guy' }
- const modUser = { id: 1, name: 'Dude' }
+ const user = { id: '1', name: 'Guy' }
+ const modUser = { id: '1', name: 'Dude' }
mutations.addNewUsers(state, [user])
expect(state.users).to.have.length(1)
@@ -21,7 +21,7 @@ describe('The users module', () => {
it('sets a mute bit on users', () => {
const state = cloneDeep(defaultState)
- const user = { id: 1, name: 'Guy' }
+ const user = { id: '1', name: 'Guy' }
mutations.addNewUsers(state, [user])
mutations.setMuted(state, {user, muted: true})
@@ -38,11 +38,11 @@ describe('The users module', () => {
it('returns user with matching screen_name', () => {
const state = {
users: [
- { screen_name: 'Guy', id: 1 }
+ { screen_name: 'Guy', id: '1' }
]
}
const name = 'Guy'
- const expected = { screen_name: 'Guy', id: 1 }
+ const expected = { screen_name: 'Guy', id: '1' }
expect(getters.userByName(state)(name)).to.eql(expected)
})
})
@@ -51,11 +51,11 @@ describe('The users module', () => {
it('returns user with matching id', () => {
const state = {
users: [
- { screen_name: 'Guy', id: 1 }
+ { screen_name: 'Guy', id: '1' }
]
}
- const id = 1
- const expected = { screen_name: 'Guy', id: 1 }
+ const id = '1'
+ const expected = { screen_name: 'Guy', id: '1' }
expect(getters.userById(state)(id)).to.eql(expected)
})
})