Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 32c6fbe

Browse files
committed
Fixed tests
1 parent 5a8b874 commit 32c6fbe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/_services/authentication.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('AuthenticationService', () => {
3434
done();
3535
});
3636

37-
const req = httpMock.expectOne('http://localhost:9000/rest/token/new');
37+
const req = httpMock.expectOne(environment.backendUrl + 'token/new');
3838
expect(req.request.method).toEqual('POST');
3939
expect(req.request.body).toEqual(user);
4040
req.flush('someResponse');

src/_services/user.service.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {TestBed} from '@angular/core/testing';
33

44
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
55
import {User} from '../_models';
6+
import {environment} from '../environments/environment';
67

78
describe('UserService', () => {
89

@@ -27,7 +28,7 @@ describe('UserService', () => {
2728
expect(user).toEqual(jasmine.objectContaining(testUser));
2829
}
2930
);
30-
const req = httpMock.expectOne('http://localhost:9000/rest/user/register');
31+
const req = httpMock.expectOne(environment.backendUrl + 'user/register');
3132
expect(req.request.method).toEqual('POST');
3233
expect(req.request.body).toEqual(testUser);
3334
req.flush(testUser);

0 commit comments

Comments
 (0)