Commit 0477a37c authored by Tim Zallmann's avatar Tim Zallmann

Fix for Conflict in api_spec.js

parent 436891da
...@@ -206,13 +206,8 @@ describe('Api', () => { ...@@ -206,13 +206,8 @@ describe('Api', () => {
}); });
}); });
<<<<<<< HEAD
it('creates a new group label', (done) => {
const namespace = 'some namespace';
=======
it('creates a group label', done => { it('creates a group label', done => {
const namespace = 'group/subgroup'; const namespace = 'group/subgroup';
>>>>>>> upstream/master
const labelData = { some: 'data' }; const labelData = { some: 'data' };
const expectedUrl = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespace); const expectedUrl = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespace);
const expectedData = { const expectedData = {
...@@ -229,11 +224,7 @@ describe('Api', () => { ...@@ -229,11 +224,7 @@ describe('Api', () => {
]; ];
}); });
<<<<<<< HEAD
Api.newLabel(namespace, null, labelData, (response) => {
=======
Api.newLabel(namespace, undefined, labelData, response => { Api.newLabel(namespace, undefined, labelData, response => {
>>>>>>> upstream/master
expect(response.name).toBe('test'); expect(response.name).toBe('test');
done(); done();
}); });
...@@ -352,18 +343,20 @@ describe('Api', () => { ...@@ -352,18 +343,20 @@ describe('Api', () => {
}); });
describe('ldap_groups', () => { describe('ldap_groups', () => {
it('calls callback on completion', (done) => { it('calls callback on completion', done => {
const query = 'query'; const query = 'query';
const provider = 'provider'; const provider = 'provider';
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, [{ mock.onGet(expectedUrl).reply(200, [
{
name: 'test', name: 'test',
}]); },
]);
Api.ldap_groups(query, provider, callback) Api.ldap_groups(query, provider, callback)
.then((response) => { .then(response => {
expect(callback).toHaveBeenCalledWith(response); expect(callback).toHaveBeenCalledWith(response);
}) })
.then(done) .then(done)
......
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