Skip to content
Snippets Groups Projects

Hin 1232 send correct email to new author

Merged Tania Fecheta requested to merge HIN-1232-send-correct-email-to-newAuthor into develop
All threads resolved!
Files
2
@@ -5,7 +5,7 @@ const { cloneDeep } = require('lodash')
const fixturesService = require('pubsweet-component-fixture-service')
const { fixtures, Model } = fixturesService
const { Collection, Fragment, User } = require('../Helper')
const { Collection, Fragment } = require('../Helper')
describe('Collection helper', () => {
let testFixtures = {}
@@ -231,26 +231,4 @@ describe('Collection helper', () => {
expect(canHEMakeRecommendation).toBe(false)
})
})
describe('isAdmin', () => {
it('should return true if user is admin', async () => {
const { admin } = testFixtures.users
const adminId = admin.id
const UserModel = models.User
const userHelper = new User({ UserModel })
const isAdmin = await userHelper.isAdmin(adminId)
expect(isAdmin).toBe(true)
})
it('should return false if user is not admin', async () => {
const { reviewer } = testFixtures.users
const reviewerId = reviewer.id
const UserModel = models.User
const userHelper = new User({ UserModel })
const isAdmin = await userHelper.isAdmin(reviewerId)
expect(isAdmin).toBe(false)
})
})
})