@@ -5,7 +5,7 @@ describe('ExternalAccount Service', function() {
5
5
var mockUserLinksData = mockData . getMockLinkedExternalAccounts ( ) ;
6
6
var mockAuth0Profile = mockData . getMockAuth0Profile ( ) ;
7
7
var mockProfile = mockData . getMockProfile ( ) ;
8
- var apiUrl ;
8
+ var apiUrl , authApiUrl ;
9
9
var auth0 , userService ;
10
10
var profileGet , profilePost , profileDelete ;
11
11
@@ -19,6 +19,7 @@ describe('ExternalAccount Service', function() {
19
19
} ) ;
20
20
21
21
apiUrl = CONSTANTS . API_URL ;
22
+ authApiUrl = CONSTANTS . AUTH_API_URL ;
22
23
service = ExternalAccountService ;
23
24
auth0 = auth ;
24
25
userService = UserService ;
@@ -47,13 +48,13 @@ describe('ExternalAccount Service', function() {
47
48
. when ( 'GET' , apiUrl + '/members/test1/externalAccounts/' )
48
49
. respond ( 200 , { result : { content : mockAccountsData } } ) ;
49
50
50
- profileGet = $httpBackend . when ( 'GET' , apiUrl + '/users/111/?fields=profiles' ) ;
51
+ profileGet = $httpBackend . when ( 'GET' , authApiUrl + '/users/111/?fields=profiles' ) ;
51
52
profileGet . respond ( 200 , { result : { content : mockUserLinksData } } ) ;
52
53
53
- profilePost = $httpBackend . when ( 'POST' , apiUrl + '/users/111/profiles/' ) ;
54
+ profilePost = $httpBackend . when ( 'POST' , authApiUrl + '/users/111/profiles/' ) ;
54
55
profilePost . respond ( 200 , { result : { content : mockProfile } } ) ;
55
56
56
- profileDelete = $httpBackend . when ( 'DELETE' , apiUrl + '/users/111/profiles/stackoverflow/' ) ;
57
+ profileDelete = $httpBackend . when ( 'DELETE' , authApiUrl + '/users/111/profiles/stackoverflow/' ) ;
57
58
profileDelete . respond ( 200 , { result : { content : mockProfile } } ) ;
58
59
59
60
} ) ;
0 commit comments