aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/specs/components/user_profile.spec.js14
-rw-r--r--test/unit/specs/modules/users.spec.js4
2 files changed, 12 insertions, 6 deletions
diff --git a/test/unit/specs/components/user_profile.spec.js b/test/unit/specs/components/user_profile.spec.js
index 23e5ce20..847481f3 100644
--- a/test/unit/specs/components/user_profile.spec.js
+++ b/test/unit/specs/components/user_profile.spec.js
@@ -12,6 +12,11 @@ const mutations = {
setError: () => {}
}
+const actions = {
+ fetchUser: () => {},
+ fetchUserByScreenName: () => {}
+}
+
const testGetters = {
findUser: state => getters.findUser(state.users)
}
@@ -30,6 +35,7 @@ const extUser = {
const externalProfileStore = new Vuex.Store({
mutations,
+ actions,
getters: testGetters,
state: {
api: {
@@ -88,7 +94,7 @@ const externalProfileStore = new Vuex.Store({
currentUser: {
credentials: ''
},
- usersObject: [extUser],
+ usersObject: { 100: extUser },
users: [extUser]
}
}
@@ -96,6 +102,7 @@ const externalProfileStore = new Vuex.Store({
const localProfileStore = new Vuex.Store({
mutations,
+ actions,
getters: testGetters,
state: {
api: {
@@ -154,14 +161,13 @@ const localProfileStore = new Vuex.Store({
currentUser: {
credentials: ''
},
- usersObject: [localUser],
+ usersObject: { 100: localUser, 'testuser': localUser },
users: [localUser]
}
}
})
-// It's a little bit more complicated now
-describe.skip('UserProfile', () => {
+describe('UserProfile', () => {
it('renders external profile', () => {
const wrapper = mount(UserProfile, {
localVue,
diff --git a/test/unit/specs/modules/users.spec.js b/test/unit/specs/modules/users.spec.js
index a7f18dce..c8bc0ae7 100644
--- a/test/unit/specs/modules/users.spec.js
+++ b/test/unit/specs/modules/users.spec.js
@@ -40,7 +40,7 @@ describe('The users module', () => {
const state = {
usersObject: {
1: user,
- Guy: user
+ guy: user
}
}
const name = 'Guy'
@@ -53,7 +53,7 @@ describe('The users module', () => {
const state = {
usersObject: {
1: user,
- Guy: user
+ guy: user
}
}
const id = '1'