Merge pull request #1581 from sharelatex/spd-wearing-middle
Fix spelling of "middleware" GitOrigin-RevId: d2b2b20ad8a6871cd6366303e75b340f0f2f2dda
This commit is contained in:
committed by
James Allen
parent
939922485c
commit
3553fb2d9d
+32
-32
@@ -2,11 +2,11 @@ sinon = require('sinon')
|
||||
chai = require('chai')
|
||||
should = chai.should()
|
||||
expect = chai.expect
|
||||
modulePath = "../../../../app/js/Features/Authorization/AuthorizationMiddlewear.js"
|
||||
modulePath = "../../../../app/js/Features/Authorization/AuthorizationMiddleware.js"
|
||||
SandboxedModule = require('sandboxed-module')
|
||||
Errors = require "../../../../app/js/Features/Errors/Errors.js"
|
||||
|
||||
describe "AuthorizationMiddlewear", ->
|
||||
describe "AuthorizationMiddleware", ->
|
||||
beforeEach ->
|
||||
@user_id = "user-id-123"
|
||||
@project_id = "project-id-123"
|
||||
@@ -14,7 +14,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
@AuthenticationController =
|
||||
getLoggedInUserId: sinon.stub().returns(@user_id)
|
||||
isUserLoggedIn: sinon.stub().returns(true)
|
||||
@AuthorizationMiddlewear = SandboxedModule.require modulePath, requires:
|
||||
@AuthorizationMiddleware = SandboxedModule.require modulePath, requires:
|
||||
"./AuthorizationManager": @AuthorizationManager = {}
|
||||
"logger-sharelatex": {log: () ->}
|
||||
"mongojs": ObjectId: @ObjectId = {}
|
||||
@@ -34,7 +34,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
|
||||
it "should get the user from session", (done) ->
|
||||
@AuthenticationController.getLoggedInUserId = sinon.stub().returns("1234")
|
||||
@AuthorizationMiddlewear._getUserId @req, (err, user_id) =>
|
||||
@AuthorizationMiddleware._getUserId @req, (err, user_id) =>
|
||||
expect(err).to.not.exist
|
||||
expect(user_id).to.equal "1234"
|
||||
done()
|
||||
@@ -42,7 +42,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
it "should get oauth_user from request", (done) ->
|
||||
@AuthenticationController.getLoggedInUserId = sinon.stub().returns(null)
|
||||
@req.oauth_user = {_id: "5678"}
|
||||
@AuthorizationMiddlewear._getUserId @req, (err, user_id) =>
|
||||
@AuthorizationMiddleware._getUserId @req, (err, user_id) =>
|
||||
expect(err).to.not.exist
|
||||
expect(user_id).to.equal "5678"
|
||||
done()
|
||||
@@ -50,7 +50,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
it "should fall back to null", (done) ->
|
||||
@AuthenticationController.getLoggedInUserId = sinon.stub().returns(null)
|
||||
@req.oauth_user = undefined
|
||||
@AuthorizationMiddlewear._getUserId @req, (err, user_id) =>
|
||||
@AuthorizationMiddleware._getUserId @req, (err, user_id) =>
|
||||
expect(err).to.not.exist
|
||||
expect(user_id).to.equal null
|
||||
done()
|
||||
@@ -61,21 +61,21 @@ describe "AuthorizationMiddlewear", ->
|
||||
"ensureUserCanWriteProjectContent": "canUserWriteProjectContent"
|
||||
"ensureUserCanAdminProject": "canUserAdminProject"
|
||||
}
|
||||
for middlewearMethod, managerMethod of METHODS_TO_TEST
|
||||
do (middlewearMethod, managerMethod) ->
|
||||
describe middlewearMethod, ->
|
||||
for middlewareMethod, managerMethod of METHODS_TO_TEST
|
||||
do (middlewareMethod, managerMethod) ->
|
||||
describe middlewareMethod, ->
|
||||
beforeEach ->
|
||||
@req.params =
|
||||
project_id: @project_id
|
||||
@AuthorizationManager[managerMethod] = sinon.stub()
|
||||
@AuthorizationMiddlewear.redirectToRestricted = sinon.stub()
|
||||
@AuthorizationMiddleware.redirectToRestricted = sinon.stub()
|
||||
|
||||
describe "with missing project_id", ->
|
||||
beforeEach ->
|
||||
@req.params = {}
|
||||
|
||||
it "should return an error to next", ->
|
||||
@AuthorizationMiddlewear[middlewearMethod] @req, @res, @next
|
||||
@AuthorizationMiddleware[middlewareMethod] @req, @res, @next
|
||||
@next.calledWith(new Error()).should.equal true
|
||||
|
||||
describe "with logged in user", ->
|
||||
@@ -89,7 +89,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, true)
|
||||
|
||||
it "should return next", ->
|
||||
@AuthorizationMiddlewear[middlewearMethod] @req, @res, @next
|
||||
@AuthorizationMiddleware[middlewareMethod] @req, @res, @next
|
||||
@next.called.should.equal true
|
||||
|
||||
describe "when user doesn't have permission", ->
|
||||
@@ -99,9 +99,9 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, false)
|
||||
|
||||
it "should redirect to redirectToRestricted", ->
|
||||
@AuthorizationMiddlewear[middlewearMethod] @req, @res, @next
|
||||
@AuthorizationMiddleware[middlewareMethod] @req, @res, @next
|
||||
@next.called.should.equal false
|
||||
@AuthorizationMiddlewear.redirectToRestricted
|
||||
@AuthorizationMiddleware.redirectToRestricted
|
||||
.calledWith(@req, @res, @next)
|
||||
.should.equal true
|
||||
|
||||
@@ -114,7 +114,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, true)
|
||||
|
||||
it "should return next", ->
|
||||
@AuthorizationMiddlewear[middlewearMethod] @req, @res, @next
|
||||
@AuthorizationMiddleware[middlewareMethod] @req, @res, @next
|
||||
@next.called.should.equal true
|
||||
|
||||
describe "when user doesn't have permission", ->
|
||||
@@ -125,9 +125,9 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, false)
|
||||
|
||||
it "should redirect to redirectToRestricted", ->
|
||||
@AuthorizationMiddlewear[middlewearMethod] @req, @res, @next
|
||||
@AuthorizationMiddleware[middlewareMethod] @req, @res, @next
|
||||
@next.called.should.equal false
|
||||
@AuthorizationMiddlewear.redirectToRestricted
|
||||
@AuthorizationMiddleware.redirectToRestricted
|
||||
.calledWith(@req, @res, @next)
|
||||
.should.equal true
|
||||
|
||||
@@ -138,14 +138,14 @@ describe "AuthorizationMiddlewear", ->
|
||||
@ObjectId.isValid = sinon.stub().returns false
|
||||
|
||||
it "should return a not found error", (done) ->
|
||||
@AuthorizationMiddlewear[middlewearMethod] @req, @res, (error) ->
|
||||
@AuthorizationMiddleware[middlewareMethod] @req, @res, (error) ->
|
||||
error.should.be.instanceof Errors.NotFoundError
|
||||
done()
|
||||
|
||||
describe "ensureUserIsSiteAdmin", ->
|
||||
beforeEach ->
|
||||
@AuthorizationManager.isUserSiteAdmin = sinon.stub()
|
||||
@AuthorizationMiddlewear.redirectToRestricted = sinon.stub()
|
||||
@AuthorizationMiddleware.redirectToRestricted = sinon.stub()
|
||||
|
||||
describe "with logged in user", ->
|
||||
beforeEach ->
|
||||
@@ -158,7 +158,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, true)
|
||||
|
||||
it "should return next", ->
|
||||
@AuthorizationMiddlewear.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@next.called.should.equal true
|
||||
|
||||
describe "when user doesn't have permission", ->
|
||||
@@ -168,9 +168,9 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, false)
|
||||
|
||||
it "should redirect to redirectToRestricted", ->
|
||||
@AuthorizationMiddlewear.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@next.called.should.equal false
|
||||
@AuthorizationMiddlewear.redirectToRestricted
|
||||
@AuthorizationMiddleware.redirectToRestricted
|
||||
.calledWith(@req, @res, @next)
|
||||
.should.equal true
|
||||
|
||||
@@ -183,7 +183,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, true)
|
||||
|
||||
it "should return next", ->
|
||||
@AuthorizationMiddlewear.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@next.called.should.equal true
|
||||
|
||||
describe "when user doesn't have permission", ->
|
||||
@@ -194,16 +194,16 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, false)
|
||||
|
||||
it "should redirect to redirectToRestricted", ->
|
||||
@AuthorizationMiddlewear.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserIsSiteAdmin @req, @res, @next
|
||||
@next.called.should.equal false
|
||||
@AuthorizationMiddlewear.redirectToRestricted
|
||||
@AuthorizationMiddleware.redirectToRestricted
|
||||
.calledWith(@req, @res, @next)
|
||||
.should.equal true
|
||||
|
||||
describe "ensureUserCanReadMultipleProjects", ->
|
||||
beforeEach ->
|
||||
@AuthorizationManager.canUserReadProject = sinon.stub()
|
||||
@AuthorizationMiddlewear.redirectToRestricted = sinon.stub()
|
||||
@AuthorizationMiddleware.redirectToRestricted = sinon.stub()
|
||||
@req.query =
|
||||
project_ids: "project1,project2"
|
||||
|
||||
@@ -221,7 +221,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, true)
|
||||
|
||||
it "should return next", ->
|
||||
@AuthorizationMiddlewear.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@next.called.should.equal true
|
||||
|
||||
describe "when user doesn't have permission to access one of the projects", ->
|
||||
@@ -234,9 +234,9 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, false)
|
||||
|
||||
it "should redirect to redirectToRestricted", ->
|
||||
@AuthorizationMiddlewear.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@next.called.should.equal false
|
||||
@AuthorizationMiddlewear.redirectToRestricted
|
||||
@AuthorizationMiddleware.redirectToRestricted
|
||||
.calledWith(@req, @res, @next)
|
||||
.should.equal true
|
||||
|
||||
@@ -253,7 +253,7 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, true)
|
||||
|
||||
it "should return next", ->
|
||||
@AuthorizationMiddlewear.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@next.called.should.equal true
|
||||
|
||||
describe "when user doesn't have permission to access one of the projects", ->
|
||||
@@ -267,8 +267,8 @@ describe "AuthorizationMiddlewear", ->
|
||||
.yields(null, false)
|
||||
|
||||
it "should redirect to redirectToRestricted", ->
|
||||
@AuthorizationMiddlewear.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@AuthorizationMiddleware.ensureUserCanReadMultipleProjects @req, @res, @next
|
||||
@next.called.should.equal false
|
||||
@AuthorizationMiddlewear.redirectToRestricted
|
||||
@AuthorizationMiddleware.redirectToRestricted
|
||||
.calledWith(@req, @res, @next)
|
||||
.should.equal true
|
||||
+12
-12
@@ -2,15 +2,15 @@ SandboxedModule = require('sandboxed-module')
|
||||
sinon = require('sinon')
|
||||
require('chai').should()
|
||||
expect = require('chai').expect
|
||||
modulePath = require('path').join __dirname, '../../../../app/js/Features/Cooldown/CooldownMiddlewear'
|
||||
modulePath = require('path').join __dirname, '../../../../app/js/Features/Cooldown/CooldownMiddleware'
|
||||
|
||||
|
||||
describe "CooldownMiddlewear", ->
|
||||
describe "CooldownMiddleware", ->
|
||||
|
||||
beforeEach ->
|
||||
@CooldownManager =
|
||||
isProjectOnCooldown: sinon.stub()
|
||||
@CooldownMiddlewear = SandboxedModule.require modulePath, requires:
|
||||
@CooldownMiddleware = SandboxedModule.require modulePath, requires:
|
||||
'./CooldownManager': @CooldownManager
|
||||
'logger-sharelatex': {log: sinon.stub()}
|
||||
|
||||
@@ -24,16 +24,16 @@ describe "CooldownMiddlewear", ->
|
||||
@next = sinon.stub()
|
||||
|
||||
it 'should call CooldownManager.isProjectOnCooldown', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@CooldownManager.isProjectOnCooldown.callCount.should.equal 1
|
||||
@CooldownManager.isProjectOnCooldown.calledWith('abc').should.equal true
|
||||
|
||||
it 'should not produce an error', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@next.callCount.should.equal 0
|
||||
|
||||
it 'should send a 429 status', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@res.sendStatus.callCount.should.equal 1
|
||||
@res.sendStatus.calledWith(429).should.equal true
|
||||
|
||||
@@ -45,12 +45,12 @@ describe "CooldownMiddlewear", ->
|
||||
@next = sinon.stub()
|
||||
|
||||
it 'should call CooldownManager.isProjectOnCooldown', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@CooldownManager.isProjectOnCooldown.callCount.should.equal 1
|
||||
@CooldownManager.isProjectOnCooldown.calledWith('abc').should.equal true
|
||||
|
||||
it 'call next with no arguments', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@next.callCount.should.equal 1
|
||||
expect(@next.lastCall.args.length).to.equal 0
|
||||
|
||||
@@ -62,12 +62,12 @@ describe "CooldownMiddlewear", ->
|
||||
@next = sinon.stub()
|
||||
|
||||
it 'should call CooldownManager.isProjectOnCooldown', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@CooldownManager.isProjectOnCooldown.callCount.should.equal 1
|
||||
@CooldownManager.isProjectOnCooldown.calledWith('abc').should.equal true
|
||||
|
||||
it 'call next with an error', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@next.callCount.should.equal 1
|
||||
expect(@next.lastCall.args[0]).to.be.instanceof Error
|
||||
|
||||
@@ -79,10 +79,10 @@ describe "CooldownMiddlewear", ->
|
||||
@next = sinon.stub()
|
||||
|
||||
it 'call next with an error', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@next.callCount.should.equal 1
|
||||
expect(@next.lastCall.args[0]).to.be.instanceof Error
|
||||
|
||||
it 'should not call CooldownManager.isProjectOnCooldown', ->
|
||||
@CooldownMiddlewear.freezeProject @req, @res, @next
|
||||
@CooldownMiddleware.freezeProject @req, @res, @next
|
||||
@CooldownManager.isProjectOnCooldown.callCount.should.equal 0
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
SandboxedModule = require('sandboxed-module')
|
||||
sinon = require('sinon')
|
||||
require('chai').should()
|
||||
modulePath = require('path').join __dirname, '../../../../app/js/Features/Security/RateLimiterMiddlewear'
|
||||
modulePath = require('path').join __dirname, '../../../../app/js/Features/Security/RateLimiterMiddleware'
|
||||
|
||||
describe "RateLimiterMiddlewear", ->
|
||||
describe "RateLimiterMiddleware", ->
|
||||
beforeEach ->
|
||||
@AuthenticationController =
|
||||
getLoggedInUserId: () =>
|
||||
@req?.session?.user?._id
|
||||
@RateLimiterMiddlewear = SandboxedModule.require modulePath, requires:
|
||||
@RateLimiterMiddleware = SandboxedModule.require modulePath, requires:
|
||||
'../../infrastructure/RateLimiter' : @RateLimiter = {}
|
||||
"logger-sharelatex": @logger = {warn: sinon.stub()}
|
||||
'../Authentication/AuthenticationController': @AuthenticationController
|
||||
@@ -22,7 +22,7 @@ describe "RateLimiterMiddlewear", ->
|
||||
|
||||
describe "rateLimit", ->
|
||||
beforeEach ->
|
||||
@rateLimiter = @RateLimiterMiddlewear.rateLimit({
|
||||
@rateLimiter = @RateLimiterMiddleware.rateLimit({
|
||||
endpointName: "test-endpoint"
|
||||
params: ["project_id", "doc_id"]
|
||||
timeInterval: 42
|
||||
+5
-5
@@ -3,10 +3,10 @@ assert = require('assert')
|
||||
require('chai').should()
|
||||
expect = require('chai').expect
|
||||
sinon = require('sinon')
|
||||
modulePath = require('path').join __dirname, '../../../../app/js/Features/SudoMode/SudoModeMiddlewear'
|
||||
modulePath = require('path').join __dirname, '../../../../app/js/Features/SudoMode/SudoModeMiddleware'
|
||||
|
||||
|
||||
describe 'SudoModeMiddlewear', ->
|
||||
describe 'SudoModeMiddleware', ->
|
||||
beforeEach ->
|
||||
@userId = 'some_user_id'
|
||||
@SudoModeHandler =
|
||||
@@ -14,7 +14,7 @@ describe 'SudoModeMiddlewear', ->
|
||||
@AuthenticationController =
|
||||
getLoggedInUserId: sinon.stub().returns(@userId)
|
||||
setRedirectInSession: sinon.stub()
|
||||
@SudoModeMiddlewear = SandboxedModule.require modulePath, requires:
|
||||
@SudoModeMiddleware = SandboxedModule.require modulePath, requires:
|
||||
'./SudoModeHandler': @SudoModeHandler
|
||||
'../Authentication/AuthenticationController': @AuthenticationController
|
||||
'logger-sharelatex': {log: sinon.stub(), err: sinon.stub()}
|
||||
@@ -27,7 +27,7 @@ describe 'SudoModeMiddlewear', ->
|
||||
@req = {externalAuthenticationSystemUsed: sinon.stub().returns(@externalAuth)}
|
||||
@res = {redirect: sinon.stub()}
|
||||
@next = sinon.stub()
|
||||
@SudoModeMiddlewear.protectPage @req, @res, @next
|
||||
@SudoModeMiddleware.protectPage @req, @res, @next
|
||||
cb()
|
||||
|
||||
describe 'when sudo mode is active', ->
|
||||
@@ -110,7 +110,7 @@ describe 'SudoModeMiddlewear', ->
|
||||
@req = {externalAuthenticationSystemUsed: sinon.stub().returns(@externalAuth)}
|
||||
@res = {redirect: sinon.stub()}
|
||||
@next = sinon.stub()
|
||||
@SudoModeMiddlewear.protectPage @req, @res, @next
|
||||
@SudoModeMiddleware.protectPage @req, @res, @next
|
||||
cb()
|
||||
|
||||
it 'should immediately return next with no args', (done) ->
|
||||
+7
-7
@@ -19,12 +19,12 @@ describe "UserMembershipAuthorization", ->
|
||||
@UserMembershipHandler =
|
||||
getEntity: sinon.stub().yields(null, @subscription)
|
||||
getEntityWithoutAuthorizationCheck: sinon.stub().yields(null, @subscription)
|
||||
@AuthorizationMiddlewear =
|
||||
@AuthorizationMiddleware =
|
||||
redirectToRestricted: sinon.stub().yields()
|
||||
ensureUserIsSiteAdmin: sinon.stub().yields()
|
||||
@UserMembershipAuthorization = SandboxedModule.require modulePath, requires:
|
||||
'../Authentication/AuthenticationController': @AuthenticationController
|
||||
'../Authorization/AuthorizationMiddlewear': @AuthorizationMiddlewear
|
||||
'../Authorization/AuthorizationMiddleware': @AuthorizationMiddleware
|
||||
'./UserMembershipHandler': @UserMembershipHandler
|
||||
'./EntityConfigs': EntityConfigs
|
||||
'../Errors/Errors': Errors
|
||||
@@ -80,14 +80,14 @@ describe "UserMembershipAuthorization", ->
|
||||
it 'handle entity no access', (done) ->
|
||||
@UserMembershipHandler.getEntity.yields(null, null)
|
||||
@UserMembershipAuthorization.requireGroupMetricsAccess @req, null, (error) =>
|
||||
sinon.assert.called(@AuthorizationMiddlewear.redirectToRestricted)
|
||||
sinon.assert.called(@AuthorizationMiddleware.redirectToRestricted)
|
||||
done()
|
||||
|
||||
it 'handle anonymous user', (done) ->
|
||||
@AuthenticationController.getSessionUser.returns(null)
|
||||
@UserMembershipAuthorization.requireGroupMetricsAccess @req, null, (error) =>
|
||||
expect(error).to.extist
|
||||
sinon.assert.called(@AuthorizationMiddlewear.redirectToRestricted)
|
||||
sinon.assert.called(@AuthorizationMiddleware.redirectToRestricted)
|
||||
sinon.assert.notCalled(@UserMembershipHandler.getEntity)
|
||||
expect(@req.entity).to.not.exist
|
||||
done()
|
||||
@@ -157,14 +157,14 @@ describe "UserMembershipAuthorization", ->
|
||||
@UserMembershipAuthorization.requireTemplateMetricsAccess @req, null, (error) =>
|
||||
expect(error).to.not.extist
|
||||
sinon.assert.notCalled(@UserMembershipHandler.getEntity)
|
||||
sinon.assert.calledOnce(@AuthorizationMiddlewear.ensureUserIsSiteAdmin)
|
||||
sinon.assert.calledOnce(@AuthorizationMiddleware.ensureUserIsSiteAdmin)
|
||||
done()
|
||||
|
||||
it 'handle graph access', (done) ->
|
||||
@req.query.resource_id = 'mock-resource-id'
|
||||
@req.query.resource_type = 'institution'
|
||||
middlewear = @UserMembershipAuthorization.requireGraphAccess
|
||||
middlewear @req, null, (error) =>
|
||||
middleware = @UserMembershipAuthorization.requireGraphAccess
|
||||
middleware @req, null, (error) =>
|
||||
expect(error).to.not.extist
|
||||
sinon.assert.calledWithMatch(
|
||||
@UserMembershipHandler.getEntity,
|
||||
|
||||
Reference in New Issue
Block a user