@@ -58,7 +58,7 @@ describe('<%= classedName %> API:', function() {
58
58
59
59
beforeEach ( function ( done ) {
60
60
request ( app )
61
- . get ( ' <%= route %>/' + new < %= classedName % > ._id)
61
+ . get ( ` <%= route %>/${ new < %= classedName % > ._id} ` )
62
62
.expect(200)
63
63
.expect('Content-Type', /json/)
64
64
.end((err, res) => {
@@ -85,7 +85,7 @@ describe('<%= classedName %> API:', function() {
85
85
86
86
beforeEach(function(done) {
87
87
request(app)
88
- . put ( ' <%= route %>/' + new < %= classedName % > ._id)
88
+ .put(` < %= route % > / $ { new<% = c l a s s e d N a m e % > ._ i d } ` )
89
89
. send ( {
90
90
name : 'Updated <%= classedName %>' ,
91
91
info : 'This is the updated <%= cameledName %>!!!'
@@ -112,15 +112,15 @@ describe('<%= classedName %> API:', function() {
112
112
113
113
it('should respond with the updated <%= cameledName %> on a subsequent GET', function(done) {
114
114
request(app)
115
- . get ( ' <%= route %>/' + new < %= classedName % > ._id)
115
+ .get(` < %= route % > / $ { new<% = c l a s s e d N a m e % > ._ i d } ` )
116
116
. expect ( 200 )
117
117
. expect ( 'Content-Type' , / j s o n / )
118
118
. end ( ( err , res ) => {
119
119
if ( err ) {
120
120
return done ( err ) ;
121
121
}
122
122
let < %= cameledName % > = res . body ;
123
-
123
+
124
124
< %= expect ( ) % > < %= cameledName % > .name< %= to ( ) % > . equal ( 'Updated <%= classedName %>' ) ;
125
125
< %= expect ( ) % > < %= cameledName % > .info< %= to ( ) % > . equal ( 'This is the updated <%= cameledName %>!!!' ) ;
126
126
@@ -134,10 +134,10 @@ describe('<%= classedName %> API:', function() {
134
134
135
135
beforeEach ( function ( done ) {
136
136
request ( app )
137
- . patch ( ' <%= route %>/' + new < %= classedName % > ._id)
137
+ . patch ( ` <%= route %>/${ new < %= classedName % > ._id} ` )
138
138
.send([
139
- { "op" : " replace" , " path" : " /name" , value : 'Patched <%= classedName %>' } ,
140
- { "op" : " replace" , " path" : " /info" , value : 'This is the patched <%= cameledName %>!!!' }
139
+ { op: ' replace', path: ' /name' , value: 'Patched <%= classedName %>' },
140
+ { op: ' replace', path: ' /info' , value: 'This is the patched <%= cameledName %>!!!' }
141
141
])
142
142
.expect(200)
143
143
.expect('Content-Type', /json/)
@@ -163,7 +163,7 @@ describe('<%= classedName %> API:', function() {
163
163
describe('DELETE <%= route %>/:id', function() {
164
164
it('should respond with 204 on successful removal', function(done) {
165
165
request(app)
166
- . delete ( ' <%= route %>/' + new < %= classedName % > ._id)
166
+ .delete(` < %= route % > / $ { new<% = c l a s s e d N a m e % > ._ i d } ` )
167
167
. expect ( 204 )
168
168
. end ( err => {
169
169
if ( err ) {
@@ -175,7 +175,7 @@ describe('<%= classedName %> API:', function() {
175
175
176
176
it('should respond with 404 when <%= cameledName %> does not exist', function(done) {
177
177
request(app)
178
- . delete ( ' <%= route %>/' + new < %= classedName % > ._id)
178
+ .delete(` < %= route % > / $ { new<% = c l a s s e d N a m e % > ._ i d } ` )
179
179
. expect ( 404 )
180
180
. end ( err => {
181
181
if ( err ) {
0 commit comments