test: corrected url in tests

This commit is contained in:
user
2021-09-21 20:08:27 +02:00
parent f8adab3bbe
commit f822ab3408
3 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
# https://www.npmjs.com/package/artillery
# https://www.npmjs.com/package/artillery-plugin-faker
config:
target: http://localhost:3000
target: http://localhost:3000/v1
phases:
- duration: 1
arrivalRate: 50

View File

@@ -40,7 +40,7 @@ defineFeature(feature, test => {
when('I send a request to create a user', async () => {
const res = await httpServer
.post('/users')
.post('/v1/users')
.send(userDto)
.expect(201);
userId = res.body;
@@ -51,7 +51,7 @@ defineFeature(feature, test => {
});
and('I can see my user in a list of all users', async () => {
const res = await httpServer.get('/users').expect(200);
const res = await httpServer.get('/v1/users').expect(200);
expect(res.body).toMatchSnapshot([snapshotBaseProps]);
expect(res.body.some((item: UserResponse) => item.id === userId.id)).toBe(