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
diff options
context:
space:
mode:
authorAndré Luís <me@andr3.net>2018-05-25 13:08:53 +0300
committerPhil Hughes <me@iamphill.com>2018-05-25 13:08:53 +0300
commitc53890548e15c15b38f3aa7911a69a4c24173f15 (patch)
treec1452bf14ae2ef959fc461b6138e5ad7651f6337 /spec/javascripts/api_spec.js
parentde12348ee8534b2a4310c81898e7151dd7616095 (diff)
Resolve "Show CI pipeline status in Web IDE"
Diffstat (limited to 'spec/javascripts/api_spec.js')
-rw-r--r--spec/javascripts/api_spec.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/javascripts/api_spec.js b/spec/javascripts/api_spec.js
index 3d7ccf432be..e8435116221 100644
--- a/spec/javascripts/api_spec.js
+++ b/spec/javascripts/api_spec.js
@@ -341,4 +341,25 @@ describe('Api', () => {
.catch(done.fail);
});
});
+
+ describe('commitPipelines', () => {
+ it('fetches pipelines for a given commit', done => {
+ const projectId = 'example/foobar';
+ const commitSha = 'abc123def';
+ const expectedUrl = `${dummyUrlRoot}/${projectId}/commit/${commitSha}/pipelines`;
+ mock.onGet(expectedUrl).reply(200, [
+ {
+ name: 'test',
+ },
+ ]);
+
+ Api.commitPipelines(projectId, commitSha)
+ .then(({ data }) => {
+ expect(data.length).toBe(1);
+ expect(data[0].name).toBe('test');
+ })
+ .then(done)
+ .catch(done.fail);
+ });
+ });
});