summaryrefslogtreecommitdiff
path: root/spec/frontend/branches
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-09-02 16:50:09 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-09-02 16:50:09 +0000
commit526ea7c5b6cfcca1b94bb8a7b826e64d494471ff (patch)
tree6b06502677e76d6ffce1fad36daebb71d6f979c5 /spec/frontend/branches
parentfb63a00ea4df8196b99570c7f5b2e21793813f9e (diff)
downloadgitlab-ce-526ea7c5b6cfcca1b94bb8a7b826e64d494471ff.tar.gz
Update Mermaid to v8.2.6
This fixes a regression where an underscore in labels no longer worked: https://github.com/knsv/mermaid/releases
Diffstat (limited to 'spec/frontend/branches')
-rw-r--r--spec/frontend/branches/divergence_graph_spec.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/frontend/branches/divergence_graph_spec.js b/spec/frontend/branches/divergence_graph_spec.js
index 8283bc966e4..adf39a2216a 100644
--- a/spec/frontend/branches/divergence_graph_spec.js
+++ b/spec/frontend/branches/divergence_graph_spec.js
@@ -25,13 +25,25 @@ describe('Divergence graph', () => {
mock.restore();
});
- it('calls axos get with list of branch names', () =>
+ it('calls axios get with list of branch names', () =>
init('/-/diverging_counts').then(() => {
expect(axios.get).toHaveBeenCalledWith('/-/diverging_counts', {
params: { names: ['master', 'test/hello-world'] },
});
}));
+ describe('no branches listed', () => {
+ beforeEach(() => {
+ document.body.innerHTML = `<div></div>`;
+ });
+
+ it('avoids requesting diverging commit counts', () => {
+ expect(axios.get).not.toHaveBeenCalledWith('/-/diverging_counts');
+
+ init('/-/diverging_counts');
+ });
+ });
+
it('creates Vue components', () =>
init('/-/diverging_counts').then(() => {
expect(document.querySelector('[data-name="master"]').innerHTML).not.toEqual('');