summaryrefslogtreecommitdiff
path: root/spec/javascripts/pipelines_spec.js
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-03-06 17:12:49 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-03-06 17:12:49 +0100
commit0e5d065848aa3149efcb5248293f265699b5b57c (patch)
tree8c9c725befc4847bf963f636a7210ac1fce3778a /spec/javascripts/pipelines_spec.js
parent46d99dedfbe10dc36c79c6f09d886ad2fc2192b5 (diff)
parent348dff0a826c45f00f992e761423a22d2ac32bc3 (diff)
downloadgitlab-ce-23993-drop-ci_projects.tar.gz
Merge remote-tracking branch 'origin/master' into 23993-drop-ci_projects23993-drop-ci_projects
Diffstat (limited to 'spec/javascripts/pipelines_spec.js')
-rw-r--r--spec/javascripts/pipelines_spec.js30
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();
+ });
+ });
+})();