Commit 7f605d07 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch '2762-ldap-group-link-select-dropdown-error' into 'master'

Resolve "LDAP group link select dropdown error"

Closes #2762

See merge request !2277
parents 62d05c23 419de6a9
......@@ -172,8 +172,7 @@ const Api = {
active: true,
}),
dataType: 'json',
})
.done(groups => callback(groups));
}).then(groups => callback(groups));
},
buildUrl(url) {
......
......@@ -278,4 +278,21 @@ describe('Api', () => {
.catch(done.fail);
});
});
describe('ldap_groups', () => {
it('calls callback on completion', (done) => {
const query = 'query';
const provider = 'provider';
const callback = jasmine.createSpy();
spyOn(jQuery, 'ajax').and.callFake(() => $.Deferred().resolve());
Api.ldap_groups(query, provider, callback)
.then((response) => {
expect(callback).toHaveBeenCalledWith(response);
})
.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