11'use strict' ;
22
33describe ( "AV.Status" , function ( ) {
4+ var targetUser = process . env . STATUS_TARGET_USER_ID || '5627906060b22ef9c464cc99' ;
45 before ( function ( ) {
56 var userName = this . userName = 'StatusTest' + Date . now ( ) ;
67 return AV . User . signUp ( userName , userName ) . then ( user => {
@@ -18,7 +19,7 @@ describe("AV.Status",function(){
1819
1920 it ( "should send private status to an user." , function ( ) {
2021 var status = new AV . Status ( 'image url' , 'message' ) ;
21- return AV . Status . sendPrivateStatus ( status , '5627906060b22ef9c464cc99' ) ;
22+ return AV . Status . sendPrivateStatus ( status , targetUser ) ;
2223 } ) ;
2324
2425 it ( "should send status to a female user." , function ( ) {
@@ -30,7 +31,7 @@ describe("AV.Status",function(){
3031 } ) ;
3132
3233 describe ( "Query statuses." , function ( ) {
33- const user = AV . Object . createWithoutData ( '_User' , '5627906060b22ef9c464cc99' ) ;
34+ const user = AV . Object . createWithoutData ( '_User' , targetUser ) ;
3435 it ( "should return unread count." , function ( ) {
3536 return AV . Status . countUnreadStatuses ( ) . then ( function ( response ) {
3637 expect ( response . total ) . to . be . a ( 'number' ) ;
@@ -62,9 +63,6 @@ describe("AV.Status",function(){
6263 } ) ;
6364
6465 describe ( "Status guide test." , function ( ) {
65- //follow 5627906060b22ef9c464cc99
66- //unfolow 5627906060b22ef9c464cc99
67- var targetUser = '5627906060b22ef9c464cc99' ;
6866 it ( "should follow/unfollow successfully." , function ( ) {
6967 return AV . User . current ( ) . follow ( targetUser ) . then ( function ( ) {
7068 var query = AV . User . current ( ) . followeeQuery ( ) ;
@@ -73,7 +71,7 @@ describe("AV.Status",function(){
7371 } ) . then ( function ( followees ) {
7472 debug ( followees ) ;
7573 expect ( followees . length ) . to . be ( 1 ) ;
76- expect ( followees [ 0 ] . id ) . to . be ( '5627906060b22ef9c464cc99' ) ;
74+ expect ( followees [ 0 ] . id ) . to . be ( targetUser ) ;
7775 expect ( followees [ 0 ] . get ( 'username' ) ) . to . be ( 'leeyeh' ) ;
7876 return AV . User . current ( ) . unfollow ( targetUser ) ;
7977 } ) . then ( function ( ) {
0 commit comments