@@ -208,13 +208,13 @@ describe("GET hacker", function () {
208208
209209 // succeed on admin case
210210 it ( "should list a hacker's information using admin power on /api/hacker/email/:email GET" , function ( done ) {
211- util . auth . login ( agent , Admin1 , ( error ) => {
211+ util . auth . login ( agent , Admin0 , ( error ) => {
212212 if ( error ) {
213213 agent . close ( ) ;
214214 return done ( error ) ;
215215 }
216216 return agent
217- . get ( `/api/hacker/email/${ storedAccount1 . email } ` )
217+ . get ( `/api/hacker/email/${ teamHackerAccount0 . email } ` )
218218 // does not have password because of to stripped json
219219 . end ( function ( err , res ) {
220220 if ( err ) {
@@ -226,7 +226,7 @@ describe("GET hacker", function () {
226226 res . body . message . should . equal ( Constants . Success . HACKER_READ ) ;
227227 res . body . should . have . property ( "data" ) ;
228228
229- let hacker = new Hacker ( storedHacker1 ) ;
229+ let hacker = new Hacker ( TeamHacker0 ) ;
230230 chai . assert . equal ( JSON . stringify ( res . body . data ) , JSON . stringify ( hacker . toJSON ( ) ) ) ;
231231
232232 done ( ) ;
@@ -236,13 +236,13 @@ describe("GET hacker", function () {
236236
237237 // succeed on :self case
238238 it ( "should list the user's hacker information on /api/hacker/email/:email GET" , function ( done ) {
239- util . auth . login ( agent , storedAccount1 , ( error ) => {
239+ util . auth . login ( agent , teamHackerAccount0 , ( error ) => {
240240 if ( error ) {
241241 agent . close ( ) ;
242242 return done ( error ) ;
243243 }
244244 return agent
245- . get ( `/api/hacker/email/${ storedAccount1 . email } ` )
245+ . get ( `/api/hacker/email/${ teamHackerAccount0 . email } ` )
246246 // does not have password because of to stripped json
247247 . end ( function ( err , res ) {
248248 if ( err ) {
@@ -254,7 +254,7 @@ describe("GET hacker", function () {
254254 res . body . message . should . equal ( Constants . Success . HACKER_READ ) ;
255255 res . body . should . have . property ( "data" ) ;
256256
257- let hacker = new Hacker ( storedHacker1 ) ;
257+ let hacker = new Hacker ( TeamHacker0 ) ;
258258
259259 chai . assert . equal ( JSON . stringify ( res . body . data ) , JSON . stringify ( hacker . toJSON ( ) ) ) ;
260260
@@ -265,13 +265,13 @@ describe("GET hacker", function () {
265265
266266 // fail due to lack of authorization
267267 it ( "should fail to list a hacker information due to lack of authorization on /api/hacker/email/:id GET" , function ( done ) {
268- util . auth . login ( agent , storedAccount2 , ( error ) => {
268+ util . auth . login ( agent , teamHackerAccount0 , ( error ) => {
269269 if ( error ) {
270270 agent . close ( ) ;
271271 return done ( error ) ;
272272 }
273273 return agent
274- . get ( `/api/hacker/email/${ storedAccount1 . email } ` )
274+ . get ( `/api/hacker/email/${ teamHackerAccount0 . email } ` )
275275 // does not have password because of to stripped json
276276 . end ( function ( err , res ) {
277277 if ( err ) {
0 commit comments