File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,27 @@ describe('<%= classedName %> API:', function() {
105105 updated < %= classedName % > = { } ;
106106 } );
107107
108- it('should respond with the updated < %= cameledName % > ', function() {
109- < %= expect ( ) % > updated < %= classedName % > . name < %= to ( ) % > . equal ( 'Updated <%= classedName %>' ) ;
110- < %= expect ( ) % > updated < %= classedName % > . info < %= to ( ) % > . equal ( 'This is the updated <%= cameledName %>!!!' ) ;
108+ it('should respond with the original < %= cameledName % > ', function() {
109+ < %= expect ( ) % > updated < %= classedName % > . name < %= to ( ) % > . equal ( 'New <%= classedName %>' ) ;
110+ < %= expect ( ) % > updated < %= classedName % > . info < %= to ( ) % > . equal ( 'This is the brand new <%= cameledName %>!!!' ) ;
111+ } );
112+
113+ it('should respond with the updated < %= cameledName % > on a subsequent GET', function(done) {
114+ request ( app )
115+ . get ( '<%= route %>/' + new < %= classedName % > ._id)
116+ .expect(200)
117+ .expect('Content-Type', /json/)
118+ .end((err, res) => {
119+ if ( err ) {
120+ return done ( err ) ;
121+ }
122+ let < %= cameledName % > = res.body;
123+
124+ < %= expect ( ) % > < %= cameledName % > .name< %= to ( ) % > . equal ( 'Updated <%= classedName %>' ) ;
125+ < %= expect ( ) % > < %= cameledName % > .info< %= to ( ) % > . equal ( 'This is the updated <%= cameledName %>!!!' ) ;
126+
127+ done ( ) ;
128+ } );
111129 } ) ;
112130 } ) ;
113131
You can’t perform that action at this time.
0 commit comments