Skip to content

Commit c6d306c

Browse files
committed
fix: update tests
1 parent 16fa4da commit c6d306c

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/services/auth/plugins/magicLink/magicLink.controller.register.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('POST /register', () => {
107107
const mockSendEmail = jest.spyOn(mailerService, 'sendRaw');
108108
const response = await app.inject({
109109
method: HttpMethod.Post,
110-
url: `/register?lang=${lang}`,
110+
url: `/api/register?lang=${lang}`,
111111
payload: { email, name, captcha: MOCK_CAPTCHA },
112112
});
113113

@@ -129,7 +129,7 @@ describe('POST /register', () => {
129129

130130
const response = await app.inject({
131131
method: HttpMethod.Post,
132-
url: `/register`,
132+
url: `/api/register`,
133133
payload: { email, name, captcha: MOCK_CAPTCHA },
134134
});
135135

@@ -146,7 +146,7 @@ describe('POST /register', () => {
146146
const mockSendEmail = jest.spyOn(mailerService, 'sendRaw');
147147
const response = await app.inject({
148148
method: HttpMethod.Post,
149-
url: `/register`,
149+
url: `/api/register`,
150150
payload: { email, name, captcha: MOCK_CAPTCHA, enableSaveActions },
151151
});
152152

@@ -171,7 +171,7 @@ describe('POST /register', () => {
171171
const mockSendEmail = jest.spyOn(mailerService, 'sendRaw');
172172
const response = await app.inject({
173173
method: HttpMethod.Post,
174-
url: `/register`,
174+
url: `/api/register`,
175175
payload: { email, name, enableSaveActions, captcha: MOCK_CAPTCHA },
176176
});
177177

src/services/item/plugins/app/appSetting/appSetting.controller.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ describe('Apps Settings Tests', () => {
784784
// copy item
785785
const response = await app.inject({
786786
method: 'POST',
787-
url: 'items/copy',
787+
url: '/api/items/copy',
788788
query: {
789789
id: [item.id],
790790
},
@@ -836,7 +836,7 @@ describe('Apps Settings Tests', () => {
836836
// copy parent
837837
const response = await app.inject({
838838
method: 'POST',
839-
url: 'items/copy',
839+
url: '/api/items/copy',
840840
query: {
841841
id: [parent.id],
842842
},

src/services/item/plugins/html/h5p/h5p.controller.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe('Service plugin', () => {
150150
// delete item
151151
await app.inject({
152152
method: 'DELETE',
153-
url: `/items/`,
153+
url: `/api/items`,
154154
query: {
155155
id: [item.id],
156156
},
@@ -191,7 +191,7 @@ describe('Service plugin', () => {
191191
// copy item
192192
await app.inject({
193193
method: 'POST',
194-
url: 'items/copy',
194+
url: '/api/items/copy',
195195
query: {
196196
id: [item.id],
197197
},

src/services/item/plugins/html/h5p/test/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function injectH5PImport(
3535

3636
return app.inject({
3737
method: 'POST',
38-
url: '/items/h5p-import',
38+
url: '/api/items/h5p-import',
3939
payload: formData,
4040
headers: formData.getHeaders(),
4141
query,

0 commit comments

Comments
 (0)