Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-05-28 13:30:18 +0300
committerFilipa Lacerda <filipa@gitlab.com>2019-05-28 13:30:18 +0300
commit5fd4415537dec9b795608b2c4e90a04f31106f88 (patch)
treea500f3d2e28bf5541ade5a25ae8d4f8b72b86075 /spec
parent4fe810544974654ca6c47ff8093558d330ea99e7 (diff)
parentecf54c2316e7c62d6afe35885e79d97e6e6c13c7 (diff)
Merge branch 'vue-repo-document-title' into 'master'
Update document title when repository router changes See merge request gitlab-org/gitlab-ce!28714
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/repository/utils/title_spec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/repository/utils/title_spec.js b/spec/frontend/repository/utils/title_spec.js
new file mode 100644
index 00000000000..c4879716fd7
--- /dev/null
+++ b/spec/frontend/repository/utils/title_spec.js
@@ -0,0 +1,15 @@
+import { setTitle } from '~/repository/utils/title';
+
+describe('setTitle', () => {
+ it.each`
+ path | title
+ ${'/'} | ${'Files'}
+ ${'app'} | ${'app'}
+ ${'app/assets'} | ${'app/assets'}
+ ${'app/assets/javascripts'} | ${'app/assets/javascripts'}
+ `('sets document title as $title for $path', ({ path, title }) => {
+ setTitle(path, 'master', 'GitLab');
+
+ expect(document.title).toEqual(`${title} · master · GitLab`);
+ });
+});