summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-08-04 12:15:36 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-08-04 12:15:36 +0100
commitc3afc61f8a9de4cf70463b0e4dc5ccf76603cce0 (patch)
tree8207af3cb52486f2e96e99ec90caa8d82a106288 /spec/javascripts
parent9afd372e9819cfc4ca56808fcb1cf89308fb73ea (diff)
downloadgitlab-ce-c3afc61f8a9de4cf70463b0e4dc5ccf76603cce0.tar.gz
Fix repo_file_buttons_spec
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/repo/components/repo_file_buttons_spec.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/javascripts/repo/components/repo_file_buttons_spec.js b/spec/javascripts/repo/components/repo_file_buttons_spec.js
index cf5fbe1c1d8..19f6bd648c3 100644
--- a/spec/javascripts/repo/components/repo_file_buttons_spec.js
+++ b/spec/javascripts/repo/components/repo_file_buttons_spec.js
@@ -13,6 +13,10 @@ describe('RepoFileButtons', () => {
const activeFile = {
extension: 'md',
url: 'url',
+ raw_path: 'raw_path',
+ blame_path: 'blame_path',
+ commits_path: 'commits_path',
+ permalink: 'permalink',
};
const activeFileLabel = 'activeFileLabel';
RepoStore.openedFiles = new Array(1);
@@ -27,11 +31,11 @@ describe('RepoFileButtons', () => {
expect(vm.$el.id).toEqual('repo-file-buttons');
expect(vm.$el.style.borderBottom).toEqual('1px solid rgb(31, 120, 209)');
- expect(raw.href).toMatch(`/${activeFile.url}`);
+ expect(raw.href).toMatch(`/${activeFile.raw_path}`);
expect(raw.textContent).toEqual('Raw');
- expect(blame.href).toMatch(`/${activeFile.url}`);
+ expect(blame.href).toMatch(`/${activeFile.blame_path}`);
expect(blame.textContent).toEqual('Blame');
- expect(history.href).toMatch(`/${activeFile.url}`);
+ expect(history.href).toMatch(`/${activeFile.commits_path}`);
expect(history.textContent).toEqual('History');
expect(vm.$el.querySelector('.permalink').textContent).toEqual('Permalink');
expect(vm.$el.querySelector('.preview').textContent).toEqual(activeFileLabel);