diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-02-07 18:02:49 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-02-07 18:33:00 +0000 |
commit | df469864b1ab1e0bfaa1e843d3d0a84042604646 (patch) | |
tree | 81a59a012180c8e2c43f8573a50d5ddec26040ab /spec/javascripts/pipelines_spec.js | |
parent | bc13687c7e374116e4830d004b82e9960d3a55cc (diff) | |
download | gitlab-ce-update-filenames-regex.tar.gz |
Updated the filename regexupdate-filenames-regex
Diffstat (limited to 'spec/javascripts/pipelines_spec.js')
-rw-r--r-- | spec/javascripts/pipelines_spec.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/javascripts/pipelines_spec.js b/spec/javascripts/pipelines_spec.js new file mode 100644 index 00000000000..72770a702d3 --- /dev/null +++ b/spec/javascripts/pipelines_spec.js @@ -0,0 +1,30 @@ +require('~/pipelines'); + +// Fix for phantomJS +if (!Element.prototype.matches && Element.prototype.webkitMatchesSelector) { + Element.prototype.matches = Element.prototype.webkitMatchesSelector; +} + +(() => { + describe('Pipelines', () => { + preloadFixtures('static/pipeline_graph.html.raw'); + + beforeEach(() => { + loadFixtures('static/pipeline_graph.html.raw'); + }); + + it('should be defined', () => { + expect(window.gl.Pipelines).toBeDefined(); + }); + + it('should create a `Pipelines` instance without options', () => { + expect(() => { new window.gl.Pipelines(); }).not.toThrow(); //eslint-disable-line + }); + + it('should create a `Pipelines` instance with options', () => { + const pipelines = new window.gl.Pipelines({ foo: 'bar' }); + + expect(pipelines.pipelineGraph).toBeDefined(); + }); + }); +})(); |