aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/components
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-03-11 02:17:49 +0200
committerHenry Jameson <me@hjkos.com>2019-03-11 02:17:58 +0200
commit06d39b62a8358c911b18f5acc378047035840465 (patch)
tree1d0179149d090929eec55125754b0f890b0889cc /test/unit/specs/components
parent489f840d84b0057cf9ddddcb8dc594bfc5ad628f (diff)
fixed tests, review fixes, now storing local users with downcase screen name for
better compatibility
Diffstat (limited to 'test/unit/specs/components')
-rw-r--r--test/unit/specs/components/user_profile.spec.js14
1 files changed, 10 insertions, 4 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,