aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/components/user_profile.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/specs/components/user_profile.spec.js')
-rw-r--r--test/unit/specs/components/user_profile.spec.js30
1 files changed, 19 insertions, 11 deletions
diff --git a/test/unit/specs/components/user_profile.spec.js b/test/unit/specs/components/user_profile.spec.js
index 41fd9cd0..1b6a47d7 100644
--- a/test/unit/specs/components/user_profile.spec.js
+++ b/test/unit/specs/components/user_profile.spec.js
@@ -12,9 +12,20 @@ const mutations = {
setError: () => {}
}
+const actions = {
+ fetchUser: () => {},
+ fetchUserByScreenName: () => {}
+}
+
const testGetters = {
- userByName: state => getters.userByName(state.users),
- userById: state => getters.userById(state.users)
+ findUser: state => getters.findUser(state.users),
+ mergedConfig: state => ({
+ colors: '',
+ highlight: {},
+ customTheme: {
+ colors: []
+ }
+ })
}
const localUser = {
@@ -31,21 +42,16 @@ const extUser = {
const externalProfileStore = new Vuex.Store({
mutations,
+ actions,
getters: testGetters,
state: {
api: {
+ fetchers: {},
backendInteractor: backendInteractorService('')
},
interface: {
browserSupport: ''
},
- config: {
- colors: '',
- highlight: {},
- customTheme: {
- colors: []
- }
- },
instance: {
hideUserStats: true
},
@@ -89,7 +95,7 @@ const externalProfileStore = new Vuex.Store({
currentUser: {
credentials: ''
},
- usersObject: [extUser],
+ usersObject: { 100: extUser },
users: [extUser]
}
}
@@ -97,9 +103,11 @@ const externalProfileStore = new Vuex.Store({
const localProfileStore = new Vuex.Store({
mutations,
+ actions,
getters: testGetters,
state: {
api: {
+ fetchers: {},
backendInteractor: backendInteractorService('')
},
interface: {
@@ -155,7 +163,7 @@ const localProfileStore = new Vuex.Store({
currentUser: {
credentials: ''
},
- usersObject: [localUser],
+ usersObject: { 100: localUser, 'testuser': localUser },
users: [localUser]
}
}