mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-16 16:28:42 +00:00
Merge pull request #1832 from overleaf/ta-fix-test-typo
Fix typo in UserMembershipAuthorization tests GitOrigin-RevId: ccb6e88297367a2986ffa6c6c74cd8f26089298e
This commit is contained in:
parent
8330c6ae61
commit
0b8a2b0157
1 changed files with 13 additions and 13 deletions
|
@ -68,7 +68,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.calledWithMatch(
|
||||
this.UserMembershipHandler.getEntity,
|
||||
this.req.params.id,
|
||||
|
@ -92,7 +92,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.extist
|
||||
expect(error).to.exist
|
||||
expect(error).to.be.instanceof(Error)
|
||||
expect(error.constructor.name).to.equal('NotFoundError')
|
||||
sinon.assert.called(this.UserMembershipHandler.getEntity)
|
||||
|
@ -113,7 +113,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
{
|
||||
redirect: path => {
|
||||
expect(path).to.extist
|
||||
expect(path).to.exist
|
||||
expect(path).to.match(/create/)
|
||||
return done()
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
{
|
||||
redirect: path => {
|
||||
expect(path).to.extist
|
||||
expect(path).to.exist
|
||||
expect(path).to.match(/create/)
|
||||
return done()
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.extist
|
||||
expect(error).to.exist
|
||||
expect(error).to.be.instanceof(Error)
|
||||
expect(error.constructor.name).to.equal('NotFoundError')
|
||||
return done()
|
||||
|
@ -177,7 +177,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.called(this.AuthorizationMiddleware.redirectToRestricted)
|
||||
sinon.assert.notCalled(this.UserMembershipHandler.getEntity)
|
||||
expect(this.req.entity).to.not.exist
|
||||
|
@ -193,7 +193,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.calledWithMatch(
|
||||
this.UserMembershipHandler.getEntity,
|
||||
this.req.params.id,
|
||||
|
@ -209,7 +209,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.calledWithMatch(
|
||||
this.UserMembershipHandler.getEntity,
|
||||
this.req.params.id,
|
||||
|
@ -225,7 +225,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.calledWithMatch(
|
||||
this.UserMembershipHandler.getEntity,
|
||||
this.req.params.id,
|
||||
|
@ -241,7 +241,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.calledWithMatch(
|
||||
this.UserMembershipHandler.getEntity,
|
||||
this.req.params.id,
|
||||
|
@ -267,7 +267,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.calledWithMatch(
|
||||
this.UserMembershipHandler.getEntity,
|
||||
'brand-slug',
|
||||
|
@ -293,7 +293,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req,
|
||||
null,
|
||||
error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.notCalled(this.UserMembershipHandler.getEntity)
|
||||
sinon.assert.calledOnce(
|
||||
this.AuthorizationMiddleware.ensureUserIsSiteAdmin
|
||||
|
@ -308,7 +308,7 @@ describe('UserMembershipAuthorization', function() {
|
|||
this.req.query.resource_type = 'institution'
|
||||
const middleware = this.UserMembershipAuthorization.requireGraphAccess
|
||||
return middleware(this.req, null, error => {
|
||||
expect(error).to.not.extist
|
||||
expect(error).to.not.exist
|
||||
sinon.assert.calledWithMatch(
|
||||
this.UserMembershipHandler.getEntity,
|
||||
this.req.query.resource_id,
|
||||
|
|
Loading…
Add table
Reference in a new issue