Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

SUP-2481, intergrate-web-links-api #589

Merged
merged 1 commit into from
Dec 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/services/externalAccounts.service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('ExternalAccount Service', function() {
var mockUserLinksData = mockData.getMockLinkedExternalAccounts();
var mockAuth0Profile = mockData.getMockAuth0Profile();
var mockProfile = mockData.getMockProfile();
var apiUrl;
var apiUrl, authApiUrl;
var auth0, userService;
var profileGet, profilePost, profileDelete;

Expand All @@ -19,6 +19,7 @@ describe('ExternalAccount Service', function() {
});

apiUrl = CONSTANTS.API_URL;
authApiUrl = CONSTANTS.AUTH_API_URL;
service = ExternalAccountService;
auth0 = auth;
userService = UserService;
Expand Down Expand Up @@ -47,13 +48,13 @@ describe('ExternalAccount Service', function() {
.when('GET', apiUrl + '/members/test1/externalAccounts/')
.respond(200, {result: {content: mockAccountsData}});

profileGet = $httpBackend.when('GET', apiUrl + '/users/111/?fields=profiles');
profileGet = $httpBackend.when('GET', authApiUrl + '/users/111/?fields=profiles');
profileGet.respond(200, {result: {content: mockUserLinksData}});

profilePost = $httpBackend.when('POST', apiUrl + '/users/111/profiles/');
profilePost = $httpBackend.when('POST', authApiUrl + '/users/111/profiles/');
profilePost.respond(200, {result: {content: mockProfile}});

profileDelete = $httpBackend.when('DELETE', apiUrl + '/users/111/profiles/stackoverflow/');
profileDelete = $httpBackend.when('DELETE', authApiUrl + '/users/111/profiles/stackoverflow/');
profileDelete.respond(200, {result: {content: mockProfile}});

});
Expand Down