@@ -41,65 +41,65 @@ var userIndex = proxyquire('./index', {
4141describe ( 'User API Router:' , function ( ) {
4242
4343 it ( 'should return an express router instance' , function ( ) {
44- userIndex . should . equal ( routerStub ) ;
44+ < %= expect ( ) % > userIndex < %= to ( ) % > . equal ( routerStub ) ;
4545 } ) ;
4646
4747 describe ( 'GET /api/users' , function ( ) {
4848
4949 it ( 'should verify admin role and route to user.controller.index' , function ( ) {
50- routerStub . get
51- . withArgs ( '/' , 'authService.hasRole.admin' , 'userCtrl.index' )
52- . should . have . been . calledOnce ;
50+ < %= expect ( ) % > routerStub . get
51+ . withArgs ( '/' , 'authService.hasRole.admin' , 'userCtrl.index' )
52+ < %= to ( ) % > . have . been . calledOnce ;
5353 } ) ;
5454
5555 } ) ;
5656
5757 describe ( 'DELETE /api/users/:id' , function ( ) {
5858
5959 it ( 'should verify admin role and route to user.controller.destroy' , function ( ) {
60- routerStub . delete
61- . withArgs ( '/:id' , 'authService.hasRole.admin' , 'userCtrl.destroy' )
62- . should . have . been . calledOnce ;
60+ < %= expect ( ) % > routerStub . delete
61+ . withArgs ( '/:id' , 'authService.hasRole.admin' , 'userCtrl.destroy' )
62+ < %= to ( ) % > . have . been . calledOnce ;
6363 } ) ;
6464
6565 } ) ;
6666
6767 describe ( 'GET /api/users/me' , function ( ) {
6868
6969 it ( 'should be authenticated and route to user.controller.me' , function ( ) {
70- routerStub . get
71- . withArgs ( '/me' , 'authService.isAuthenticated' , 'userCtrl.me' )
72- . should . have . been . calledOnce ;
70+ < %= expect ( ) % > routerStub . get
71+ . withArgs ( '/me' , 'authService.isAuthenticated' , 'userCtrl.me' )
72+ < %= to ( ) % > . have . been . calledOnce ;
7373 } ) ;
7474
7575 } ) ;
7676
7777 describe ( 'PUT /api/users/:id/password' , function ( ) {
7878
7979 it ( 'should be authenticated and route to user.controller.changePassword' , function ( ) {
80- routerStub . put
81- . withArgs ( '/:id/password' , 'authService.isAuthenticated' , 'userCtrl.changePassword' )
82- . should . have . been . calledOnce ;
80+ < %= expect ( ) % > routerStub . put
81+ . withArgs ( '/:id/password' , 'authService.isAuthenticated' , 'userCtrl.changePassword' )
82+ < %= to ( ) % > . have . been . calledOnce ;
8383 } ) ;
8484
8585 } ) ;
8686
8787 describe ( 'GET /api/users/:id' , function ( ) {
8888
8989 it ( 'should be authenticated and route to user.controller.show' , function ( ) {
90- routerStub . get
91- . withArgs ( '/:id' , 'authService.isAuthenticated' , 'userCtrl.show' )
92- . should . have . been . calledOnce ;
90+ < %= expect ( ) % > routerStub . get
91+ . withArgs ( '/:id' , 'authService.isAuthenticated' , 'userCtrl.show' )
92+ < %= to ( ) % > . have . been . calledOnce ;
9393 } ) ;
9494
9595 } ) ;
9696
9797 describe ( 'POST /api/users' , function ( ) {
9898
9999 it ( 'should route to user.controller.create' , function ( ) {
100- routerStub . post
101- . withArgs ( '/' , 'userCtrl.create' )
102- . should . have . been . calledOnce ;
100+ < %= expect ( ) % > routerStub . post
101+ . withArgs ( '/' , 'userCtrl.create' )
102+ < %= to ( ) % > . have . been . calledOnce ;
103103 } ) ;
104104
105105 } ) ;
0 commit comments