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:
authorPaul Slaughter <pslaughter@gitlab.com>2018-12-05 10:22:00 +0300
committerPaul Slaughter <pslaughter@gitlab.com>2018-12-05 23:40:08 +0300
commit8ce8303fa9fe79ba0383b7a708f9e9b5311348c3 (patch)
tree2c79a21b4799bc15f3e3a941caface4f681b896d /spec/javascripts
parent83a95a02c230dbb2616df0fd93ff19e5ac61d9ef (diff)
Add projectRunners to api.js
- This is needed by the Web Terminal to check environment
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/api_spec.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/javascripts/api_spec.js b/spec/javascripts/api_spec.js
index 7de38913bae..46f72214831 100644
--- a/spec/javascripts/api_spec.js
+++ b/spec/javascripts/api_spec.js
@@ -180,6 +180,23 @@ describe('Api', () => {
});
});
+ describe('projectRunners', () => {
+ it('fetches the runners of a project', done => {
+ const projectPath = 7;
+ const params = { scope: 'active' };
+ const mockData = [{ id: 4 }];
+ const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${projectPath}/runners`;
+ mock.onGet(expectedUrl, { params }).reply(200, mockData);
+
+ Api.projectRunners(projectPath, { params })
+ .then(({ data }) => {
+ expect(data).toEqual(mockData);
+ })
+ .then(done)
+ .catch(done.fail);
+ });
+ });
+
describe('newLabel', () => {
it('creates a new label', done => {
const namespace = 'some namespace';