import * as user from './user.rules' ; describe ( 'evaluators' , ( ) => { describe ( 'isAdmin' , ( ) => { it ( 'should return [true] if user is admin' , ( ) => { const context = { profile : { isAdmin : true } } ; expect ( user . isAdmin ( context ) ) . toBe ( true ) ; } ) ; it ( 'should return [false] if user is not an admin' , ( ) => { const context = { profile : { isAdmin : false } } ; expect ( user . isAdmin ( context ) ) . toBe ( false ) ; } ) ; } ) ; } ) ;