Commit 419de6a9 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Add ldap_groups test to api_spec.js

parent 90d679fb
......@@ -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