@@ -15,15 +15,15 @@ describe('FitbitClient Authorization flow', function() {
15
15
16
16
it ( 'it has a default authorization url' , function ( ) {
17
17
var authorization_uri = client . getAuthorizationUrl ( ) ;
18
- var final_url = 'https://api. fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fredirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&response_type=code&client_id=clientId_1234' ;
18
+ var final_url = 'https://fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fredirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&response_type=code&client_id=clientId_1234' ;
19
19
20
20
expect ( authorization_uri ) . to . eql ( final_url ) ;
21
21
} ) ;
22
22
23
23
it ( 'accept a different redirect_uri for authorization' , function ( ) {
24
24
var redirect_uri = 'http://different_redirect_uri' ;
25
25
var authorization_uri = client . getAuthorizationUrl ( redirect_uri ) ;
26
- var final_url = 'https://api. fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fdifferent_redirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&response_type=code&client_id=clientId_1234' ;
26
+ var final_url = 'https://fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fdifferent_redirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&response_type=code&client_id=clientId_1234' ;
27
27
28
28
expect ( authorization_uri ) . to . eql ( final_url ) ;
29
29
} ) ;
@@ -33,7 +33,7 @@ describe('FitbitClient Authorization flow', function() {
33
33
var scope = config . FITBIT_DEFAULT_SCOPE ;
34
34
scope . push ( 'heartrate' ) ;
35
35
var authorization_uri = client . getAuthorizationUrl ( redirect_uri , scope ) ;
36
- var final_url = 'https://api. fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fdifferent_redirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&scope=heartrate&response_type=code&client_id=clientId_1234' ;
36
+ var final_url = 'https://fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fdifferent_redirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&scope=heartrate&response_type=code&client_id=clientId_1234' ;
37
37
38
38
expect ( authorization_uri ) . to . eql ( final_url ) ;
39
39
} ) ;
@@ -44,7 +44,7 @@ describe('FitbitClient Authorization flow', function() {
44
44
scope . push ( 'heartrate' ) ;
45
45
var state = 'KEEP_THIS_STATE' ;
46
46
var authorization_uri = client . getAuthorizationUrl ( redirect_uri , scope , state ) ;
47
- var final_url = 'https://api. fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fdifferent_redirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&scope=heartrate&scope=heartrate&state=KEEP_THIS_STATE&response_type=code&client_id=clientId_1234' ;
47
+ var final_url = 'https://fitbit.com/oauth2/authorize?redirect_uri=http%3A%2F%2Fdifferent_redirect_uri&scope=activity&scope=nutrition&scope=profile&scope=settings&scope=sleep&scope=social&scope=weight&scope=heartrate&scope=heartrate&state=KEEP_THIS_STATE&response_type=code&client_id=clientId_1234' ;
48
48
49
49
expect ( authorization_uri ) . to . eql ( final_url ) ;
50
50
} ) ;
0 commit comments