Commit 7875e343 authored by André Luís's avatar André Luís

Resolve conflict with spec/javascripts/api_spec.js

parent 058cca73
......@@ -342,7 +342,6 @@ describe('Api', () => {
});
});
<<<<<<< HEAD
describe('ldap_groups', () => {
it('calls callback on completion', done => {
const query = 'query';
......@@ -350,29 +349,36 @@ describe('Api', () => {
const callback = jasmine.createSpy();
const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/ldap/${provider}/groups.json`;
=======
mock.onGet(expectedUrl).reply(200, [
{
name: 'test',
},
]);
Api.ldap_groups(query, provider, callback)
.then(response => {
expect(callback).toHaveBeenCalledWith(response);
})
.then(done)
.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`;
>>>>>>> upstream/master
mock.onGet(expectedUrl).reply(200, [
{
name: 'test',
},
]);
<<<<<<< HEAD
Api.ldap_groups(query, provider, callback)
.then(response => {
expect(callback).toHaveBeenCalledWith(response);
=======
Api.commitPipelines(projectId, commitSha)
.then(({ data }) => {
expect(data.length).toBe(1);
expect(data[0].name).toBe('test');
>>>>>>> upstream/master
})
.then(done)
.catch(done.fail);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment