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', () => { ...@@ -342,7 +342,6 @@ describe('Api', () => {
}); });
}); });
<<<<<<< HEAD
describe('ldap_groups', () => { describe('ldap_groups', () => {
it('calls callback on completion', done => { it('calls callback on completion', done => {
const query = 'query'; const query = 'query';
...@@ -350,29 +349,36 @@ describe('Api', () => { ...@@ -350,29 +349,36 @@ describe('Api', () => {
const callback = jasmine.createSpy(); const callback = jasmine.createSpy();
const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/ldap/${provider}/groups.json`; 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', () => { describe('commitPipelines', () => {
it('fetches pipelines for a given commit', done => { it('fetches pipelines for a given commit', done => {
const projectId = 'example/foobar'; const projectId = 'example/foobar';
const commitSha = 'abc123def'; const commitSha = 'abc123def';
const expectedUrl = `${dummyUrlRoot}/${projectId}/commit/${commitSha}/pipelines`; const expectedUrl = `${dummyUrlRoot}/${projectId}/commit/${commitSha}/pipelines`;
>>>>>>> upstream/master
mock.onGet(expectedUrl).reply(200, [ mock.onGet(expectedUrl).reply(200, [
{ {
name: 'test', name: 'test',
}, },
]); ]);
<<<<<<< HEAD
Api.ldap_groups(query, provider, callback)
.then(response => {
expect(callback).toHaveBeenCalledWith(response);
=======
Api.commitPipelines(projectId, commitSha) Api.commitPipelines(projectId, commitSha)
.then(({ data }) => { .then(({ data }) => {
expect(data.length).toBe(1); expect(data.length).toBe(1);
expect(data[0].name).toBe('test'); expect(data[0].name).toBe('test');
>>>>>>> upstream/master
}) })
.then(done) .then(done)
.catch(done.fail); .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