aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2018-12-29 16:25:45 +0200
committershpuld <shp@cock.li>2018-12-29 16:25:45 +0200
commit16c7bd0199717e705697ddcce100cc2141eb0afc (patch)
treef96ed970d6106a4be664201424f859dcce891f33 /test
parent747e4090cabfda353e76c9a45def70bef8c297e5 (diff)
parent1555a5fef38dced753c418d736468712ea818975 (diff)
merge develop, fix conflicts, fix logged out bug
Diffstat (limited to 'test')
-rw-r--r--test/unit/specs/boot/routes.spec.js10
-rw-r--r--test/unit/specs/services/user_profile_link_generator/user_profile_link_generator.spec.js6
2 files changed, 15 insertions, 1 deletions
diff --git a/test/unit/specs/boot/routes.spec.js b/test/unit/specs/boot/routes.spec.js
index 9963555f..383ba90f 100644
--- a/test/unit/specs/boot/routes.spec.js
+++ b/test/unit/specs/boot/routes.spec.js
@@ -12,7 +12,7 @@ describe('routes', () => {
})
it('root path', () => {
- router.push('/~/main/all')
+ router.push('/main/all')
const matchedComponents = router.getMatchedComponents()
@@ -26,4 +26,12 @@ describe('routes', () => {
expect(matchedComponents[0].components.hasOwnProperty('UserCardContent')).to.eql(true)
})
+
+ it('user\'s profile at /users', () => {
+ router.push('/users/fake-user-name')
+
+ const matchedComponents = router.getMatchedComponents()
+
+ expect(matchedComponents[0].components.hasOwnProperty('UserCardContent')).to.eql(true)
+ })
})
diff --git a/test/unit/specs/services/user_profile_link_generator/user_profile_link_generator.spec.js b/test/unit/specs/services/user_profile_link_generator/user_profile_link_generator.spec.js
index 4366f799..8c7a2895 100644
--- a/test/unit/specs/services/user_profile_link_generator/user_profile_link_generator.spec.js
+++ b/test/unit/specs/services/user_profile_link_generator/user_profile_link_generator.spec.js
@@ -12,4 +12,10 @@ describe('generateProfileLink', () => {
name: 'external-user-profile', params: { id: 1 }
})
})
+
+ it('returns obj for restricted user', () => {
+ expect(generateProfileLink(1, 'lain', ['lain'])).to.eql({
+ name: 'external-user-profile', params: { id: 1 }
+ })
+ })
})