This test is no longer relevant.

This commit is contained in:
Julien Fontanet 2015-10-12 10:26:45 +02:00
parent 334d843955
commit c418c766d8

View File

@ -1,48 +0,0 @@
/* eslint-env mocha */
import expect from 'must'
import {assert, spy} from 'sinon'
// ===================================================================
import authLdap from './'
// ===================================================================
describe('authLdap()', function () {
before(function () {
this.instance = authLdap({})
this.xo = {
registerAuthenticationProvider: spy(),
unregisterAuthenticationProvider: spy()
}
})
it('is a function', function () {
expect(authLdap).to.be.a.function()
})
it('returns an object', function () {
expect(this.instance).to.be.an.object()
})
it('#load(xo) register the auth provider', function () {
this.instance.load(this.xo)
const spy = this.xo.registerAuthenticationProvider
assert.calledOnce(spy)
this.provider = spy.args[0][0]
expect(this.provider).to.be.a.function()
})
it('#unload(xo) unregister the auth provider', function () {
this.instance.unload(this.xo)
const spy = this.xo.unregisterAuthenticationProvider
assert.calledOnce(spy)
expect(spy.args[0][0]).to.be(this.provider)
})
})