@@ -107,25 +107,11 @@ describe('Integration tests for: /api/home', function() {
107107 . get ( '/api/home' )
108108 . set ( 'Authorization' , `Bearer ${ jwtToken } ` )
109109 . then ( res => {
110- < << << << HEAD
111- console . log ( "The body:" , res . body [ 0 ] . sets ) ;
112- = === ===
113110 console . log ( "The body:" , res . body [ 0 ] . sets ) ;
114- > >>> >>> dff35dff0e6fd194376bd54c2775744a4a60aa8b
115111 expect ( res ) . to . have . status ( HTTP_STATUS_CODES . OK ) ;
116112 expect ( res ) . to . be . json ;
117113 expect ( res . body ) . to . be . a ( 'array' ) ;
118114 expect ( res . body ) . to . have . lengthOf . at . least ( 1 ) ;
119- < << << << HEAD
120-
121- const workout = res . body [ 0 ] ;
122- console . log ( "User workout:" , workout )
123-
124- expect ( workout ) . to . include . keys ( 'user' , 'sets' ) ;
125- expect ( workout . sets ) . to . include . keys ( 'exercise' , 'set' , 'reps' )
126- expect ( workout . user ) . to . be . a ( 'string' ) ;
127-
128- = === ===
129115
130116 const workout = res . body [ 0 ] ;
131117 console . log ( "User workout:" , workout )
@@ -134,19 +120,13 @@ describe('Integration tests for: /api/home', function() {
134120 expect ( workout . sets ) . to . include . keys ( 'exercise' , 'set' , 'reps' )
135121 expect ( workout . user ) . to . be . a ( 'string' ) ;
136122
137- > >>> >>> dff35dff0e6fd194376bd54c2775744a4a60aa8b
138123 } ) ;
139124 } ) ;
140125
141126 it ( 'Should return a specific workout' , function ( ) {
142127 let foundWorkout ;
143128 return Workout . find ( )
144129 . then ( workouts => {
145- < << << << HEAD
146-
147- === = ===
148-
149- >>> > >>> dff35dff0e6fd194376bd54c2775744a4a60aa8b
150130 expect ( workouts ) . to . be . a ( 'array' ) ;
151131 expect ( workouts ) . to . have . lengthOf . at . least ( 1 ) ;
152132 foundWorkout = workouts [ 0 ] ;
@@ -156,19 +136,11 @@ describe('Integration tests for: /api/home', function() {
156136 . set ( 'Authorization' , `Bearer ${ jwtToken } ` ) ;
157137 } )
158138 . then ( res => {
159- < << << << HEAD
160-
161- expect ( res ) . to . have . status ( HTTP_STATUS_CODES . OK ) ;
162- expect ( res ) . to . be . json ;
163- // expect(res.body).to.be.a('object');
164- expect ( res . body ) . to . include . keys ( 'user' , 'sets' ) ;
165- = === ===
166139
167140 expect ( res ) . to . have . status ( HTTP_STATUS_CODES . OK ) ;
168141 expect ( res ) . to . be . json ;
169142 // expect(res.body).to.be.a('object');
170143 expect ( res . body ) . to . include . keys ( 'user' , 'sets' ) ;
171- > >>> >>> dff35dff0e6fd194376bd54c2775744a4a60aa8b
172144 expect ( res . body . sets ) . to . include . keys ( 'exercise' , 'set' , 'reps' ) ;
173145
174146 } ) ;
@@ -208,10 +180,6 @@ describe('Integration tests for: /api/home', function() {
208180 }
209181
210182 function createFakerWorkout ( ) {
211- < << << << HEAD
212- return { sets :{ exercise : faker . lorem . word ( ) , set : faker . random . number ( ) , reps : faker . random . number ( ) } } ;
213- === === =
214183 return { sets : { exercise : faker . lorem . word ( ) , set : faker . random . number ( ) , reps : faker . random . number ( ) } } ;
215- >>> >>> > dff35dff0e6fd194376bd54c2775744a4a60aa8b
216184 }
217185} ) ;
0 commit comments