IPアドレス追加に伴う修正漏れ対応
This commit is contained in:
parent
bce9866ba3
commit
5ef222134e
@ -136,7 +136,7 @@ describe('createAccount', () => {
|
||||
});
|
||||
|
||||
const { accountId, externalUserId, userId } = await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -213,7 +213,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -285,7 +285,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -346,7 +346,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -377,7 +377,7 @@ describe('createAccount', () => {
|
||||
// ADB2Cユーザー削除メソッドが呼ばれているか確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
it('アカウントを作成がDBへの通信失敗によって500エラーが発生した場合、リカバリ処理が実行されるが、ADB2Cユーザー削除で失敗した場合、500エラーが返却される', async () => {
|
||||
@ -414,7 +414,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -445,7 +445,7 @@ describe('createAccount', () => {
|
||||
// ADB2Cユーザー削除メソッドが呼ばれているか確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
|
||||
@ -485,7 +485,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -516,7 +516,7 @@ describe('createAccount', () => {
|
||||
// ADB2Cユーザー削除メソッドが呼ばれているか確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
|
||||
@ -558,7 +558,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -589,7 +589,7 @@ describe('createAccount', () => {
|
||||
// ADB2Cユーザー削除メソッドが呼ばれているか確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
|
||||
@ -650,7 +650,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -681,11 +681,11 @@ describe('createAccount', () => {
|
||||
// ADB2Cユーザー削除メソッドが呼ばれているか確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
// Blobストレージのコンテナ削除メソッドが呼ばれているか確認
|
||||
expect(blobstorageService.deleteContainer).toBeCalledWith(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1, //新規作成したアカウントのID
|
||||
country,
|
||||
);
|
||||
@ -745,7 +745,7 @@ describe('createAccount', () => {
|
||||
|
||||
try {
|
||||
await service.createAccount(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
companyName,
|
||||
country,
|
||||
dealerAccountId,
|
||||
@ -776,11 +776,11 @@ describe('createAccount', () => {
|
||||
// ADB2Cユーザー削除メソッドが呼ばれているか確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
// Blobストレージのコンテナ削除メソッドが呼ばれているか確認
|
||||
expect(blobstorageService.deleteContainer).toBeCalledWith(
|
||||
makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1, //新規作成したアカウントのID
|
||||
country,
|
||||
);
|
||||
@ -820,7 +820,7 @@ describe('createPartnerAccount', () => {
|
||||
{ external_id: adminExternalId },
|
||||
);
|
||||
|
||||
const context = makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const companyName = 'test_company_name';
|
||||
const country = 'US';
|
||||
const email = 'partner@example.com';
|
||||
@ -897,7 +897,7 @@ describe('createPartnerAccount', () => {
|
||||
{ external_id: adminExternalId },
|
||||
);
|
||||
|
||||
const context = makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const companyName = 'test_company_name';
|
||||
const country = 'US';
|
||||
const email = 'partner@example.com';
|
||||
@ -975,7 +975,7 @@ describe('createPartnerAccount', () => {
|
||||
{ external_id: adminExternalId },
|
||||
);
|
||||
|
||||
const context = makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const companyName = 'test_company_name';
|
||||
const country = 'US';
|
||||
const email = 'partner@example.com';
|
||||
@ -1064,7 +1064,7 @@ describe('createPartnerAccount', () => {
|
||||
{ external_id: adminExternalId },
|
||||
);
|
||||
|
||||
const context = makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const companyName = 'test_company_name';
|
||||
const country = 'US';
|
||||
const email = 'partner@example.com';
|
||||
@ -1156,7 +1156,7 @@ describe('createPartnerAccount', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const partnerExternalId = 'partner_external_id';
|
||||
@ -1242,7 +1242,7 @@ describe('createPartnerAccount', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const partnerExternalId = 'partner_external_id';
|
||||
@ -1338,7 +1338,7 @@ describe('createPartnerAccount', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const partnerExternalId = 'partner_external_id';
|
||||
@ -1434,7 +1434,7 @@ describe('createPartnerAccount', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const partnerExternalId = 'partner_external_id';
|
||||
@ -1531,7 +1531,7 @@ describe('createPartnerAccount', () => {
|
||||
{ external_id: adminExternalId },
|
||||
);
|
||||
|
||||
const context = makeContext('uuid', 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext('uuid', 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const companyName = 'test_company_name';
|
||||
const country = 'US';
|
||||
const email = 'partner@example.com';
|
||||
@ -1624,7 +1624,7 @@ describe('AccountsService', () => {
|
||||
licensesRepositoryMockValue,
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(await service.getLicenseSummary(context, accountId)).toEqual(
|
||||
expectedAccountLisenceCounts,
|
||||
);
|
||||
@ -1657,7 +1657,7 @@ describe('AccountsService', () => {
|
||||
licensesRepositoryMockValue,
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getLicenseSummary(context, accountId)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -1692,7 +1692,7 @@ describe('AccountsService', () => {
|
||||
licensesRepositoryMockValue,
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(await service.getTypists(context, externalId)).toEqual([
|
||||
{ id: 1, name: 'Typist1' },
|
||||
{ id: 2, name: 'Typist2' },
|
||||
@ -1726,7 +1726,7 @@ describe('AccountsService', () => {
|
||||
licensesRepositoryMockValue,
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTypists(context, externalId)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -1761,7 +1761,7 @@ describe('AccountsService', () => {
|
||||
licensesRepositoryMockValue,
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTypists(context, externalId)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -1797,7 +1797,7 @@ describe('AccountsService', () => {
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(await service.getTypistGroups(context, externalId)).toEqual([
|
||||
{ id: 1, name: 'GroupA' },
|
||||
{ id: 2, name: 'GroupB' },
|
||||
@ -1831,7 +1831,7 @@ describe('AccountsService', () => {
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTypistGroups(context, externalId)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -1867,7 +1867,7 @@ describe('AccountsService', () => {
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTypistGroups(context, externalId)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -2050,7 +2050,7 @@ describe('getPartnerAccount', () => {
|
||||
const offset = 0;
|
||||
const limit = 20;
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const response = await service.getPartnerLicenses(
|
||||
context,
|
||||
limit,
|
||||
@ -2197,7 +2197,7 @@ describe('getPartnerAccount', () => {
|
||||
const offset = 0;
|
||||
const limit = 20;
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const response = await service.getPartnerLicenses(
|
||||
context,
|
||||
limit,
|
||||
@ -2296,7 +2296,7 @@ describe('getOrderHistories', () => {
|
||||
const offset = 1;
|
||||
const limit = 2;
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const response = await service.getOrderHistories(
|
||||
context,
|
||||
limit,
|
||||
@ -2341,7 +2341,7 @@ describe('getOrderHistories', () => {
|
||||
licensesRepositoryMockValue,
|
||||
worktypesRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.getOrderHistories(context, limit, offset, accountId),
|
||||
).rejects.toEqual(
|
||||
@ -2449,7 +2449,7 @@ describe('issueLicense', () => {
|
||||
|
||||
const context = makeContext(
|
||||
'userId-parent',
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2547,7 +2547,7 @@ describe('issueLicense', () => {
|
||||
|
||||
const context = makeContext(
|
||||
'userId-parent',
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2650,7 +2650,7 @@ describe('issueLicense', () => {
|
||||
|
||||
const context = makeContext(
|
||||
'userId-parent',
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2716,7 +2716,7 @@ describe('getDealers', () => {
|
||||
})
|
||||
).account;
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(await service.getDealers(context)).toEqual({
|
||||
dealers: [
|
||||
@ -2745,7 +2745,7 @@ describe('getDealers', () => {
|
||||
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(await service.getDealers(context)).toEqual({
|
||||
dealers: [],
|
||||
});
|
||||
@ -2811,7 +2811,7 @@ describe('createTypistGroup', () => {
|
||||
const typistUserIds = userIds;
|
||||
const context = makeContext(
|
||||
adminExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await service.createTypistGroup(
|
||||
@ -2879,7 +2879,7 @@ describe('createTypistGroup', () => {
|
||||
const typistUserIds = userIds;
|
||||
const context = makeContext(
|
||||
adminExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await expect(
|
||||
@ -2934,7 +2934,7 @@ describe('createTypistGroup', () => {
|
||||
const typistUserIds = [...userIds, 9999]; //存在しないユーザーIDを追加
|
||||
const context = makeContext(
|
||||
adminExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await expect(
|
||||
@ -2990,7 +2990,7 @@ describe('createTypistGroup', () => {
|
||||
const typistUserIds = [...userIds];
|
||||
const context = makeContext(
|
||||
adminExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await expect(
|
||||
@ -3045,7 +3045,7 @@ describe('createTypistGroup', () => {
|
||||
const typistUserIds = userIds;
|
||||
const context = makeContext(
|
||||
adminExternalId,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
//DBアクセスに失敗するようにする
|
||||
@ -3119,7 +3119,7 @@ describe('getTypistGroup', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3183,7 +3183,7 @@ describe('getTypistGroup', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await service.createTypistGroup(
|
||||
@ -3242,7 +3242,7 @@ describe('getTypistGroup', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3328,7 +3328,7 @@ describe('updateTypistGroup', () => {
|
||||
const typistUserIds = [userIds[1]];
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const typistGroupName = 'typist-group-name';
|
||||
@ -3404,7 +3404,7 @@ describe('updateTypistGroup', () => {
|
||||
const typistUserIds = [userIds[2]];
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3472,7 +3472,7 @@ describe('updateTypistGroup', () => {
|
||||
const typistUserIds = [999];
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await service.createTypistGroup(
|
||||
@ -3539,7 +3539,7 @@ describe('updateTypistGroup', () => {
|
||||
const typistUserIds = [...userIds];
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await service.createTypistGroup(
|
||||
@ -3606,7 +3606,7 @@ describe('updateTypistGroup', () => {
|
||||
const typistUserIds = [userIds[1]];
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await service.createTypistGroup(
|
||||
@ -3673,7 +3673,7 @@ describe('updateTypistGroup', () => {
|
||||
const typistUserIds = [userIds[1]];
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
await service.createTypistGroup(
|
||||
@ -3753,7 +3753,7 @@ describe('getWorktypes', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3798,7 +3798,7 @@ describe('getWorktypes', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3820,7 +3820,7 @@ describe('getWorktypes', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3885,7 +3885,7 @@ describe('createWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3930,7 +3930,7 @@ describe('createWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const worktypeId = 'worktype1';
|
||||
@ -3965,7 +3965,7 @@ describe('createWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4002,7 +4002,7 @@ describe('createWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4054,7 +4054,7 @@ describe('updateWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4107,7 +4107,7 @@ describe('updateWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4158,7 +4158,7 @@ describe('updateWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const worktype1 = new Worktype();
|
||||
@ -4224,7 +4224,7 @@ describe('updateWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4276,7 +4276,7 @@ describe('updateWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4353,7 +4353,7 @@ describe('deleteWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4405,7 +4405,7 @@ describe('deleteWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4456,7 +4456,7 @@ describe('deleteWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4504,7 +4504,7 @@ describe('deleteWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4552,7 +4552,7 @@ describe('deleteWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4621,7 +4621,7 @@ describe('getOptionItems', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4668,7 +4668,7 @@ describe('getOptionItems', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4707,7 +4707,7 @@ describe('getOptionItems', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4772,7 +4772,7 @@ describe('updateOptionItems', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4902,7 +4902,7 @@ describe('updateOptionItems', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -4992,7 +4992,7 @@ describe('updateOptionItems', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -5110,7 +5110,7 @@ describe('updateActiveWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -5141,7 +5141,7 @@ describe('updateActiveWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -5183,7 +5183,7 @@ describe('updateActiveWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -5220,7 +5220,7 @@ describe('updateActiveWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -5257,7 +5257,7 @@ describe('updateActiveWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -5300,7 +5300,7 @@ describe('updateActiveWorktype', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -5390,7 +5390,7 @@ describe('ライセンス発行キャンセル', () => {
|
||||
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
await service.cancelIssue(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier1Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
tier5Accounts.account.id,
|
||||
@ -5453,7 +5453,7 @@ describe('ライセンス発行キャンセル', () => {
|
||||
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
await service.cancelIssue(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier2Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
tier5Accounts.account.id,
|
||||
@ -5491,7 +5491,7 @@ describe('ライセンス発行キャンセル', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
await expect(
|
||||
service.cancelIssue(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier1Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
tier5Accounts.account.id,
|
||||
@ -5537,7 +5537,7 @@ describe('ライセンス発行キャンセル', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
await expect(
|
||||
service.cancelIssue(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier1Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
tier5Accounts.account.id,
|
||||
@ -5583,7 +5583,7 @@ describe('ライセンス発行キャンセル', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
await expect(
|
||||
service.cancelIssue(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier1Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
tier5Accounts.account.id,
|
||||
@ -5630,7 +5630,7 @@ describe('ライセンス発行キャンセル', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
await expect(
|
||||
service.cancelIssue(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier1Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
tier5Accounts.account.id,
|
||||
@ -5749,7 +5749,7 @@ describe('パートナー一覧取得', () => {
|
||||
});
|
||||
|
||||
const partners = await service.getPartners(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier1Accounts[0].users[0].external_id,
|
||||
15,
|
||||
0,
|
||||
@ -5798,7 +5798,7 @@ describe('パートナー一覧取得', () => {
|
||||
});
|
||||
|
||||
const partners = await service.getPartners(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
account.admin.external_id,
|
||||
15,
|
||||
0,
|
||||
@ -5840,7 +5840,7 @@ describe('アカウント情報更新', () => {
|
||||
tier: 5,
|
||||
});
|
||||
await service.updateAccountInfo(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier5Accounts.admin.external_id,
|
||||
tier5Accounts.account.tier,
|
||||
true,
|
||||
@ -5869,7 +5869,7 @@ describe('アカウント情報更新', () => {
|
||||
role: 'typist',
|
||||
});
|
||||
await service.updateAccountInfo(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier4Accounts[0].users[0].external_id,
|
||||
tier4Accounts[0].account.tier,
|
||||
false,
|
||||
@ -5899,7 +5899,7 @@ describe('アカウント情報更新', () => {
|
||||
role: 'typist',
|
||||
});
|
||||
await service.updateAccountInfo(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier4Accounts[0].users[0].external_id,
|
||||
tier4Accounts[0].account.tier,
|
||||
false,
|
||||
@ -5930,7 +5930,7 @@ describe('アカウント情報更新', () => {
|
||||
});
|
||||
await expect(
|
||||
service.updateAccountInfo(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier4Accounts[0].users[0].external_id,
|
||||
tier4Accounts[0].account.tier,
|
||||
false,
|
||||
@ -5956,7 +5956,7 @@ describe('アカウント情報更新', () => {
|
||||
});
|
||||
await expect(
|
||||
service.updateAccountInfo(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier5Accounts.admin.external_id,
|
||||
tier5Accounts.account.tier,
|
||||
true,
|
||||
@ -5982,7 +5982,7 @@ describe('アカウント情報更新', () => {
|
||||
});
|
||||
await expect(
|
||||
service.updateAccountInfo(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier5Accounts.admin.external_id,
|
||||
tier5Accounts.account.tier,
|
||||
true,
|
||||
@ -6029,7 +6029,7 @@ describe('getAccountInfo', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -6112,7 +6112,7 @@ describe('getAuthors', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const authors = await service.getAuthors(context, admin.external_id);
|
||||
@ -6156,7 +6156,7 @@ describe('getAuthors', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const authors = await service.getAuthors(context, admin.external_id);
|
||||
@ -6184,7 +6184,7 @@ describe('getAuthors', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const authors = await service.getAuthors(context, admin.external_id);
|
||||
@ -6204,7 +6204,7 @@ describe('getAuthors', () => {
|
||||
const service = module.get<AccountsService>(AccountsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -6289,7 +6289,7 @@ describe('getTypists', () => {
|
||||
],
|
||||
});
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const typists = await service.getTypists(context, admin.external_id);
|
||||
|
||||
//実行結果を確認
|
||||
@ -6317,7 +6317,7 @@ describe('getTypists', () => {
|
||||
overrideAdB2cService(service, {
|
||||
getUsers: async () => [{ id: admin.external_id, displayName: '' }],
|
||||
});
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const typists = await service.getTypists(context, admin.external_id);
|
||||
|
||||
//実行結果を確認
|
||||
@ -6366,7 +6366,7 @@ describe('getTypists', () => {
|
||||
],
|
||||
});
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const typists = await service.getTypists(context, admin.external_id);
|
||||
|
||||
//実行結果を確認
|
||||
@ -6393,7 +6393,7 @@ describe('getTypists', () => {
|
||||
UsersRepositoryService,
|
||||
);
|
||||
usersService.findTypistUsers = jest.fn().mockRejectedValue('DB failed');
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
//実行結果を確認
|
||||
try {
|
||||
@ -6462,7 +6462,7 @@ describe('deleteAccountAndData', () => {
|
||||
|
||||
const context = makeContext(
|
||||
tier5AccountsA.admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
// 第一階層~第五階層までのライセンス注文を作成
|
||||
@ -6647,7 +6647,7 @@ describe('deleteAccountAndData', () => {
|
||||
const admin = admin1;
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
// 第五階層のアカウント作成
|
||||
@ -6715,7 +6715,7 @@ describe('deleteAccountAndData', () => {
|
||||
const admin = admin1;
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
// 第五階層のアカウント作成
|
||||
@ -6774,7 +6774,7 @@ describe('deleteAccountAndData', () => {
|
||||
const admin = admin1;
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
// 第五階層のアカウント作成
|
||||
@ -6847,7 +6847,7 @@ describe('getAccountInfoMinimalAccess', () => {
|
||||
});
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -6876,7 +6876,7 @@ describe('getAccountInfoMinimalAccess', () => {
|
||||
});
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -6905,7 +6905,7 @@ describe('getAccountInfoMinimalAccess', () => {
|
||||
});
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -6937,7 +6937,7 @@ describe('getAccountInfoMinimalAccess', () => {
|
||||
});
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -6998,7 +6998,7 @@ describe('getCompanyName', () => {
|
||||
});
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const response = await service.getCompanyName(context, account.id);
|
||||
@ -7017,7 +7017,7 @@ describe('getCompanyName', () => {
|
||||
});
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
try {
|
||||
|
||||
@ -31,7 +31,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjkwMDAwMDAwMDAsIm5iZiI6MTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaXNzdWVyIiwic3ViIjoic3ViIiwiYXVkIjoiYXVkIiwibm9uY2UiOiJkZWZhdWx0Tm9uY2UiLCJpYXQiOjEwMDAwMDAwMDAsImF1dGhfdGltZSI6MTAwMDAwMDAwMCwiZW1haWxzIjpbInh4eEB4eC5jb20iXSwidGZwIjoic2lnbmluX3VzZXJmbG93In0.RyieW-VHsHPQOjXbbhRc307AYJOc1sq2hrcu4SW1-K0pvLlkplepxvx02a3vCwQrnBYrIP5w6HExG-S_JgW5nYyWr6DeY11mA484n9KA8GeAcAXV37StH1gfWUJvfGb4C8BaMbMM9Ix4Z9NGwKA9vjNwevfmBZnz9lQUePgv6BJNmyvCt8ElJ01O-1WODbZuojJ4xXymA1OqluzfbphPOsqWTSNmTn0emkLjjnlMQf1iwM4C_kvvr8dUCFg0_UGDfQVJnzPEKB38UqnhLnC5WacrddDwQ0kBuGKZgZ_63Q_7fOvqAZivqLK7BPmbPxi6mx3R1S9Eq2ugzpY1LfJOjA';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(await service.getVerifiedIdToken(context, token)).toEqual(
|
||||
idTokenPayload,
|
||||
);
|
||||
@ -43,7 +43,7 @@ describe('AuthService', () => {
|
||||
const service = await makeAuthServiceMock(adb2cParam, configMockValue);
|
||||
const token = 'invalid.id.token';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E000101'), HttpStatus.UNAUTHORIZED),
|
||||
);
|
||||
@ -58,7 +58,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjEwMDAwMDAwMDAsIm5iZiI6MTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaXNzdWVyIiwic3ViIjoic3ViIiwiYXVkIjoiYXVkIiwibm9uY2UiOiJkZWZhdWx0Tm9uY2UiLCJpYXQiOjEwMDAwMDAwMDAsImF1dGhfdGltZSI6MTAwMDAwMDAwMCwiZW1haWxzIjpbInh4eEB4eC5jb20iXSwidGZwIjoic2lnbmluX3VzZXJmbG93In0.r9x61Mf1S2qFgU_QDKB6tRFBmTQXyOEtpoacOlL_bQzFz1t3GsxMy6SJIvQQ-LtDgylQ1UCdMFiRuy4V8nyLuME0fR-9IkKsboGvwllHB_Isai3XFoja0jpDHMVby1m0B3Z9xOTb7YsaQGyEH-qs1TtnRm6Ny98h4Po80nK8HGefQZHBOlfQN_B1LiHwI3nLXV18NL-4olKXj2NloNRYtnWM0PaqDQcGvZFaSNvtrSYpo9ddD906QWDGVOQ7WvGSUgdNCoxX8Lb3r2-VSj6n84jpb-Y1Fz-GhLluNglAsBhasnJfUIvCIO3iG5pRyTYjHFAVHmzjr8xMOmhS3s41Jw';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E000102'), HttpStatus.UNAUTHORIZED),
|
||||
);
|
||||
@ -73,7 +73,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjkwMDAwMDAwMDAsIm5iZiI6OTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaXNzdWVyIiwic3ViIjoic3ViIiwiYXVkIjoiYXVkIiwibm9uY2UiOiJkZWZhdWx0Tm9uY2UiLCJpYXQiOjEwMDAwMDAwMDAsImF1dGhfdGltZSI6MTAwMDAwMDAwMCwiZW1haWxzIjpbInh4eEB4eC5jb20iXSwidGZwIjoic2lnbmluX3VzZXJmbG93In0.fX2Gbd7fDPNE3Lw-xbum_5CVqQYqEmMhv_v5u8A-U81pmPD2P5rsJEJx66ns1taFLVaE3j9_OzotxrqjqqQqbACkagGcN5wvA3_ZIxyqmhrKYFJc53ZcO7d0pFWiQlluNBI_pnFNDlSMB2Ut8Th5aiPy2uamBM9wC99bcjo7HkHvTKBf6ljU6rPKoD51qGDWqNxjoH-hdSJ29wprvyxyk_yX6dp-cxXUj5DIgXYQuIZF71rdiPtGlAiyTBns8rS2QlEEXapZVlvYrK4mkpUXVDA7ifD8q6gAC2BStqHeys7CGp2MbV4ZwKCVbAUbMs6Tboh8rADZvQhuTEq7qlhZ-w';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E000103'), HttpStatus.UNAUTHORIZED),
|
||||
);
|
||||
@ -86,7 +86,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjkwMDAwMDAwMDAsIm5iZiI6MTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaXNzdXNlciIsInN1YiI6InN1YiIsImF1ZCI6ImF1ZCIsIm5vbmNlIjoiZGVmYXVsdE5vbmNlIiwiaWF0IjoxMDAwMDAwMDAwLCJhdXRoX3RpbWUiOjEwMDAwMDAwMDAsImVtYWlscyI6WyJ4eHhAeHguY29tIl0sInRmcCI6InNpZ25pbl91c2VyZmxvdyJ9.sign';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E000104'), HttpStatus.UNAUTHORIZED),
|
||||
);
|
||||
@ -101,7 +101,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjkwMDAwMDAwMDAsIm5iZiI6MTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaW52bGlkX2lzc3VlciIsInN1YiI6InN1YiIsImF1ZCI6ImF1ZCIsIm5vbmNlIjoiZGVmYXVsdE5vbmNlIiwiaWF0IjoxMDAwMDAwMDAwLCJhdXRoX3RpbWUiOjEwMDAwMDAwMDAsImVtYWlscyI6WyJ4eHhAeHguY29tIl0sInRmcCI6InNpZ25pbl91c2VyZmxvdyJ9.0bp3e1mDG78PX3lo8zgOLXGenIqG_Vi6kw7CbwauAQM-cnUZ_aVCoJ_dAv_QmPElOQKcCkRrAvAZ91FwuHDlBGuuDqx8OwqN0VaD-4NPouoAswj-9HNvBm8gUn-pGaXkvWt_72UdCJavZJjDj_RHur8y8kFt5Qeab3mUP2x-uNcV2Q2x3M_IIfcRiIZkRZm_azKfiVIy7tzoUFLDss97y938aR8imMVxazoSQvj7RWIWylgeRr9yVt7qYl18cnEVL0IGtslFbqhfNsiEmRCMsttm5kXs7E9B0bhhUe_xbJW9VumQ6G7dgMrswevp_jRgbpWJoZsgErtqIRl9Tc9ikA';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E000105'), HttpStatus.UNAUTHORIZED),
|
||||
);
|
||||
@ -115,7 +115,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjkwMDAwMDAwMDAsIm5iZiI6MTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaXNzdWVyIiwic3ViIjoic3ViIiwiYXVkIjoiYXVkIiwibm9uY2UiOiJkZWZhdWx0Tm9uY2UiLCJpYXQiOjEwMDAwMDAwMDAsImF1dGhfdGltZSI6MTAwMDAwMDAwMCwiZW1haWxzIjpbInh4eEB4eC5jb20iXSwidGZwIjoic2lnbmluX3VzZXJmbG93In0.RyieW-VHsHPQOjXbbhRc307AYJOc1sq2hrcu4SW1-K0pvLlkplepxvx02a3vCwQrnBYrIP5w6HExG-S_JgW5nYyWr6DeY11mA484n9KA8GeAcAXV37StH1gfWUJvfGb4C8BaMbMM9Ix4Z9NGwKA9vjNwevfmBZnz9lQUePgv6BJNmyvCt8ElJ01O-1WODbZuojJ4xXymA1OqluzfbphPOsqWTSNmTn0emkLjjnlMQf1iwM4C_kvvr8dUCFg0_UGDfQVJnzPEKB38UqnhLnC5WacrddDwQ0kBuGKZgZ_63Q_7fOvqAZivqLK7BPmbPxi6mx3R1S9Eq2ugzpY1LfJOjA';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -131,7 +131,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjkwMDAwMDAwMDAsIm5iZiI6MTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaXNzdWVyIiwic3ViIjoic3ViIiwiYXVkIjoiYXVkIiwibm9uY2UiOiJkZWZhdWx0Tm9uY2UiLCJpYXQiOjEwMDAwMDAwMDAsImF1dGhfdGltZSI6MTAwMDAwMDAwMCwiZW1haWxzIjpbInh4eEB4eC5jb20iXSwidGZwIjoic2lnbmluX3VzZXJmbG93In0.RyieW-VHsHPQOjXbbhRc307AYJOc1sq2hrcu4SW1-K0pvLlkplepxvx02a3vCwQrnBYrIP5w6HExG-S_JgW5nYyWr6DeY11mA484n9KA8GeAcAXV37StH1gfWUJvfGb4C8BaMbMM9Ix4Z9NGwKA9vjNwevfmBZnz9lQUePgv6BJNmyvCt8ElJ01O-1WODbZuojJ4xXymA1OqluzfbphPOsqWTSNmTn0emkLjjnlMQf1iwM4C_kvvr8dUCFg0_UGDfQVJnzPEKB38UqnhLnC5WacrddDwQ0kBuGKZgZ_63Q_7fOvqAZivqLK7BPmbPxi6mx3R1S9Eq2ugzpY1LfJOjA';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -150,7 +150,7 @@ describe('AuthService', () => {
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtpZCJ9.eyJleHAiOjkwMDAwMDAwMDAsIm5iZiI6MTAwMDAwMDAwMCwidmVyIjoiMS4wIiwiaXNzIjoiaXNzdWVyIiwic3ViIjoic3ViIiwiYXVkIjoiYXVkIiwibm9uY2UiOiJkZWZhdWx0Tm9uY2UiLCJpYXQiOjEwMDAwMDAwMDAsImF1dGhfdGltZSI6MTAwMDAwMDAwMCwiZW1haWxzIjpbInh4eEB4eC5jb20iXSwidGZwIjoic2lnbmluX3VzZXJmbG93In0.RyieW-VHsHPQOjXbbhRc307AYJOc1sq2hrcu4SW1-K0pvLlkplepxvx02a3vCwQrnBYrIP5w6HExG-S_JgW5nYyWr6DeY11mA484n9KA8GeAcAXV37StH1gfWUJvfGb4C8BaMbMM9Ix4Z9NGwKA9vjNwevfmBZnz9lQUePgv6BJNmyvCt8ElJ01O-1WODbZuojJ4xXymA1OqluzfbphPOsqWTSNmTn0emkLjjnlMQf1iwM4C_kvvr8dUCFg0_UGDfQVJnzPEKB38UqnhLnC5WacrddDwQ0kBuGKZgZ_63Q_7fOvqAZivqLK7BPmbPxi6mx3R1S9Eq2ugzpY1LfJOjA';
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getVerifiedIdToken(context, token)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -186,7 +186,7 @@ describe('checkIsAcceptedLatestVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 5,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const idToken = {
|
||||
emails: [],
|
||||
@ -210,7 +210,7 @@ describe('checkIsAcceptedLatestVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 4,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const idToken = {
|
||||
emails: [],
|
||||
@ -234,7 +234,7 @@ describe('checkIsAcceptedLatestVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 5,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const idToken = {
|
||||
emails: [],
|
||||
@ -258,7 +258,7 @@ describe('checkIsAcceptedLatestVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 4,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const idToken = {
|
||||
emails: [],
|
||||
@ -282,7 +282,7 @@ describe('checkIsAcceptedLatestVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 4,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const idToken = {
|
||||
emails: [],
|
||||
@ -306,7 +306,7 @@ describe('checkIsAcceptedLatestVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 4,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const idToken = {
|
||||
emails: [],
|
||||
@ -363,7 +363,7 @@ describe('generateDelegationRefreshToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -405,7 +405,7 @@ describe('generateDelegationRefreshToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -447,7 +447,7 @@ describe('generateDelegationRefreshToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -509,7 +509,7 @@ describe('generateDelegationAccessToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -558,7 +558,7 @@ describe('generateDelegationAccessToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -617,7 +617,7 @@ describe('updateDelegationAccessToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -679,7 +679,7 @@ describe('updateDelegationAccessToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -749,7 +749,7 @@ describe('updateDelegationAccessToken', () => {
|
||||
|
||||
const context = makeContext(
|
||||
parentAdmin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ describe('publishUploadSas', () => {
|
||||
null,
|
||||
null,
|
||||
);
|
||||
const context = makeContext(externalId, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(externalId, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const baseUrl = `https://saodmsusdev.blob.core.windows.net/account-${account.id}/${userId}`;
|
||||
|
||||
//SASトークンを返却する
|
||||
@ -109,7 +109,7 @@ describe('publishUploadSas', () => {
|
||||
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -141,7 +141,7 @@ describe('publishUploadSas', () => {
|
||||
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -174,7 +174,7 @@ describe('publishUploadSas', () => {
|
||||
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -222,7 +222,7 @@ describe('publishUploadSas', () => {
|
||||
|
||||
await expect(
|
||||
service.publishUploadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
),
|
||||
).rejects.toEqual(
|
||||
@ -283,7 +283,7 @@ describe('publishUploadSas', () => {
|
||||
|
||||
await expect(
|
||||
service.publishUploadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
),
|
||||
).rejects.toEqual(
|
||||
@ -366,7 +366,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
const result = await service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
authorExternalId,
|
||||
'http://blob/url/file.zip',
|
||||
authorAuthorId ?? '',
|
||||
@ -386,7 +386,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
expect(result).toEqual({ jobNumber: '00000001' });
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${typistUserId}`],
|
||||
{
|
||||
authorId: 'AUTHOR_ID',
|
||||
@ -467,7 +467,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
const result = await service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
authorExternalId,
|
||||
'http://blob/url/file.zip',
|
||||
authorAuthorId ?? '',
|
||||
@ -487,7 +487,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
expect(result).toEqual({ jobNumber: '00000002' });
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${typistUserId}`],
|
||||
{
|
||||
authorId: 'AUTHOR_ID',
|
||||
@ -590,7 +590,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
const result = await service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
myExternalId, // API実行者のユーザーIDを設定
|
||||
'http://blob/url/file.zip',
|
||||
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
|
||||
@ -610,7 +610,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
expect(result).toEqual({ jobNumber: '00000001' });
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${typistUserId}`],
|
||||
{
|
||||
authorId: 'AUTHOR_ID',
|
||||
@ -712,7 +712,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
const result = await service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
myExternalId, // API実行者のユーザーIDを設定
|
||||
'http://blob/url/file.zip',
|
||||
'XXXXXXXXXX', // 音声ファイルの情報には、録音者のAuthorIDが入る
|
||||
@ -732,7 +732,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
expect(result).toEqual({ jobNumber: '00000001' });
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${typistUserId}`],
|
||||
{
|
||||
authorId: 'XXXXXXXXXX',
|
||||
@ -781,7 +781,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
const service = module.get<FilesService>(FilesService);
|
||||
|
||||
const result = await service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
authorExternalId, // API実行者のユーザーIDを設定
|
||||
'http://blob/url/file.zip',
|
||||
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
|
||||
@ -837,7 +837,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
|
||||
await expect(
|
||||
service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
authorExternalId,
|
||||
'http://blob/url/file.zip',
|
||||
authorAuthorId ?? '',
|
||||
@ -884,7 +884,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
|
||||
await expect(
|
||||
service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
authorExternalId,
|
||||
'http://blob/url/file.zip',
|
||||
authorAuthorId ?? '',
|
||||
@ -925,7 +925,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
|
||||
await expect(
|
||||
service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
'authorExternalId',
|
||||
'http://blob/url/file.zip',
|
||||
'authorAuthorId',
|
||||
@ -976,7 +976,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
||||
|
||||
await expect(
|
||||
service.uploadFinished(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
authorExternalId,
|
||||
'http://blob/url/file.zip',
|
||||
authorAuthorId ?? '',
|
||||
@ -1061,7 +1061,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
expect(
|
||||
await service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1131,7 +1131,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
expect(
|
||||
await service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1178,7 +1178,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1232,7 +1232,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('tracking', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('tracking', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1277,7 +1277,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1309,7 +1309,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
1,
|
||||
),
|
||||
@ -1358,7 +1358,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1413,7 +1413,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1485,7 +1485,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishAudioFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1553,7 +1553,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
expect(
|
||||
await service.publishTemplateFileDownloadSas(
|
||||
makeContext('tracking', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('tracking', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1623,7 +1623,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
expect(
|
||||
await service.publishTemplateFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1664,7 +1664,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('tracking', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('tracking', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1714,7 +1714,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('tracking', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('tracking', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1759,7 +1759,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('tracking', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('tracking', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1791,7 +1791,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('tracking', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('tracking', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
1,
|
||||
),
|
||||
@ -1839,7 +1839,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('tracking', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('tracking', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1894,7 +1894,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -1966,7 +1966,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
||||
|
||||
await expect(
|
||||
service.publishTemplateFileDownloadSas(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
audioFileId,
|
||||
),
|
||||
@ -2005,7 +2005,7 @@ describe('publishTemplateFileUploadSas', () => {
|
||||
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
const baseUrl = `https://saodmsusdev.blob.core.windows.net/account-${account.id}/Templates`;
|
||||
@ -2034,7 +2034,7 @@ describe('publishTemplateFileUploadSas', () => {
|
||||
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2066,7 +2066,7 @@ describe('publishTemplateFileUploadSas', () => {
|
||||
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2119,7 +2119,7 @@ describe('templateUploadFinished', () => {
|
||||
const { account, admin } = await makeTestAccount(source, { tier: 5 });
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2157,7 +2157,7 @@ describe('templateUploadFinished', () => {
|
||||
const { account, admin } = await makeTestAccount(source, { tier: 5 });
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2201,7 +2201,7 @@ describe('templateUploadFinished', () => {
|
||||
const { account, admin } = await makeTestAccount(source, { tier: 5 });
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ describe('LicensesService', () => {
|
||||
const userId = '0001';
|
||||
body.orderCount = 1000;
|
||||
body.poNumber = '1';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(
|
||||
await service.licenseOrders(
|
||||
context,
|
||||
@ -87,7 +87,7 @@ describe('LicensesService', () => {
|
||||
const userId = '';
|
||||
body.orderCount = 1000;
|
||||
body.poNumber = '1';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.licenseOrders(context, userId, body.poNumber, body.orderCount),
|
||||
).rejects.toEqual(
|
||||
@ -115,7 +115,7 @@ describe('LicensesService', () => {
|
||||
const userId = '0001';
|
||||
body.orderCount = 1000;
|
||||
body.poNumber = '1';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.licenseOrders(context, userId, body.poNumber, body.orderCount),
|
||||
).rejects.toEqual(
|
||||
@ -143,7 +143,7 @@ describe('LicensesService', () => {
|
||||
const userId = '0001';
|
||||
body.orderCount = 1000;
|
||||
body.poNumber = '1';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.licenseOrders(context, userId, body.poNumber, body.orderCount),
|
||||
).rejects.toEqual(
|
||||
@ -181,7 +181,7 @@ describe('LicensesService', () => {
|
||||
'AEJWRFFSWRQYQQJ6WVLV',
|
||||
],
|
||||
};
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(
|
||||
await service.issueCardLicenseKeys(context, userId, body.createCount),
|
||||
).toEqual(issueCardLicensesResponse);
|
||||
@ -201,7 +201,7 @@ describe('LicensesService', () => {
|
||||
const body = new IssueCardLicensesRequest();
|
||||
const userId = '0001';
|
||||
body.createCount = 1000;
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.issueCardLicenseKeys(context, userId, body.createCount),
|
||||
).rejects.toEqual(
|
||||
@ -225,7 +225,7 @@ describe('LicensesService', () => {
|
||||
const body = new ActivateCardLicensesRequest();
|
||||
const userId = '0001';
|
||||
body.cardLicenseKey = 'WZCETXC0Z9PQZ9GKRGGY';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(
|
||||
await service.activateCardLicenseKey(
|
||||
context,
|
||||
@ -249,7 +249,7 @@ describe('LicensesService', () => {
|
||||
const body = new ActivateCardLicensesRequest();
|
||||
const userId = '0001';
|
||||
body.cardLicenseKey = 'WZCETXC0Z9PQZ9GKRGGY';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.activateCardLicenseKey(context, userId, body.cardLicenseKey),
|
||||
).rejects.toEqual(
|
||||
@ -276,7 +276,7 @@ describe('LicensesService', () => {
|
||||
const body = new ActivateCardLicensesRequest();
|
||||
const userId = '0001';
|
||||
body.cardLicenseKey = 'WZCETXC0Z9PQZ9GKRGGY';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.activateCardLicenseKey(context, userId, body.cardLicenseKey),
|
||||
).rejects.toEqual(
|
||||
@ -299,7 +299,7 @@ describe('LicensesService', () => {
|
||||
const body = new ActivateCardLicensesRequest();
|
||||
const userId = '0001';
|
||||
body.cardLicenseKey = 'WZCETXC0Z9PQZ9GKRGGY';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(
|
||||
service.activateCardLicenseKey(context, userId, body.cardLicenseKey),
|
||||
).rejects.toEqual(
|
||||
@ -342,7 +342,7 @@ describe('DBテスト', () => {
|
||||
|
||||
const service = module.get<LicensesService>(LicensesService);
|
||||
const issueCount = 500;
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await service.issueCardLicenseKeys(context, externalId, issueCount);
|
||||
const dbSelectResult = await selectCardLicensesCount(source);
|
||||
expect(dbSelectResult.count).toEqual(issueCount);
|
||||
@ -382,7 +382,7 @@ describe('DBテスト', () => {
|
||||
await createCardLicenseIssue(source, issueId);
|
||||
|
||||
const service = module.get<LicensesService>(LicensesService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await service.activateCardLicenseKey(context, externalId, cardLicenseKey);
|
||||
const dbSelectResultFromCardLicense = await selectCardLicense(
|
||||
@ -529,7 +529,7 @@ describe('DBテスト', () => {
|
||||
null,
|
||||
);
|
||||
const service = module.get<LicensesService>(LicensesService);
|
||||
const context = makeContext('userId', 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext('userId', 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const response = await service.getAllocatableLicenses(context, externalId);
|
||||
// 対象外のデータは取得していないことを確認する
|
||||
expect(response.allocatableLicenses.length).toBe(5);
|
||||
@ -600,7 +600,7 @@ describe('ライセンス割り当て', () => {
|
||||
const expiry_date = new NewAllocatedLicenseExpirationDate();
|
||||
|
||||
await service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
1,
|
||||
);
|
||||
@ -669,7 +669,7 @@ describe('ライセンス割り当て', () => {
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
|
||||
await service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
1,
|
||||
);
|
||||
@ -748,7 +748,7 @@ describe('ライセンス割り当て', () => {
|
||||
const expiry_date = new NewAllocatedLicenseExpirationDate();
|
||||
|
||||
await service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
2,
|
||||
);
|
||||
@ -851,7 +851,7 @@ describe('ライセンス割り当て', () => {
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
2,
|
||||
);
|
||||
@ -915,7 +915,7 @@ describe('ライセンス割り当て', () => {
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
2,
|
||||
);
|
||||
@ -979,7 +979,7 @@ describe('ライセンス割り当て', () => {
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
2,
|
||||
);
|
||||
@ -1025,7 +1025,7 @@ describe('ライセンス割り当て', () => {
|
||||
|
||||
await expect(
|
||||
service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
1,
|
||||
),
|
||||
@ -1077,7 +1077,7 @@ describe('ライセンス割り当て', () => {
|
||||
|
||||
await expect(
|
||||
service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
1,
|
||||
),
|
||||
@ -1086,7 +1086,7 @@ describe('ライセンス割り当て', () => {
|
||||
);
|
||||
await expect(
|
||||
service.allocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
2,
|
||||
),
|
||||
@ -1152,7 +1152,7 @@ describe('ライセンス割り当て解除', () => {
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.deallocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
);
|
||||
|
||||
@ -1243,7 +1243,7 @@ describe('ライセンス割り当て解除', () => {
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await expect(
|
||||
service.deallocateLicense(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
),
|
||||
).rejects.toEqual(
|
||||
@ -1301,7 +1301,7 @@ describe('ライセンス注文キャンセル', () => {
|
||||
|
||||
const service = module.get<LicensesService>(LicensesService);
|
||||
await service.cancelOrder(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier2Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
);
|
||||
@ -1337,7 +1337,7 @@ describe('ライセンス注文キャンセル', () => {
|
||||
const service = module.get<LicensesService>(LicensesService);
|
||||
await expect(
|
||||
service.cancelOrder(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier2Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
),
|
||||
@ -1368,7 +1368,7 @@ describe('ライセンス注文キャンセル', () => {
|
||||
const service = module.get<LicensesService>(LicensesService);
|
||||
await expect(
|
||||
service.cancelOrder(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
tier2Accounts[0].users[0].external_id,
|
||||
poNumber,
|
||||
),
|
||||
|
||||
@ -19,7 +19,7 @@ describe('NotificationService.register', () => {
|
||||
|
||||
expect(
|
||||
await service.register(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
'external_id',
|
||||
'apns',
|
||||
'handler',
|
||||
@ -38,7 +38,7 @@ describe('NotificationService.register', () => {
|
||||
|
||||
await expect(
|
||||
service.register(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
'external_id',
|
||||
'apns',
|
||||
'handler',
|
||||
@ -63,7 +63,7 @@ describe('NotificationService.register', () => {
|
||||
|
||||
await expect(
|
||||
service.register(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
'external_id',
|
||||
'apns',
|
||||
'handler',
|
||||
|
||||
@ -63,7 +63,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
expect(
|
||||
await service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[ADMIN_ROLES.ADMIN, USER_ROLES.NONE],
|
||||
offset,
|
||||
@ -138,7 +138,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
await expect(
|
||||
service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[ADMIN_ROLES.ADMIN, USER_ROLES.NONE],
|
||||
offset,
|
||||
@ -180,7 +180,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
await expect(
|
||||
service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[ADMIN_ROLES.ADMIN, USER_ROLES.NONE],
|
||||
offset,
|
||||
@ -266,7 +266,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
await expect(
|
||||
service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[ADMIN_ROLES.ADMIN, USER_ROLES.NONE],
|
||||
offset,
|
||||
@ -310,7 +310,7 @@ describe('TasksService', () => {
|
||||
const paramName = 'JOB_NUMBER';
|
||||
const direction = 'ASC';
|
||||
const result = await service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[USER_ROLES.AUTHOR],
|
||||
offset,
|
||||
@ -393,7 +393,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
await expect(
|
||||
service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[USER_ROLES.AUTHOR],
|
||||
offset,
|
||||
@ -438,7 +438,7 @@ describe('TasksService', () => {
|
||||
const paramName = 'JOB_NUMBER';
|
||||
const direction = 'ASC';
|
||||
const result = await service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[USER_ROLES.TYPIST],
|
||||
offset,
|
||||
@ -521,7 +521,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
await expect(
|
||||
service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[USER_ROLES.TYPIST],
|
||||
offset,
|
||||
@ -563,7 +563,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
await expect(
|
||||
service.tasksService.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
userId,
|
||||
[ADMIN_ROLES.ADMIN, USER_ROLES.NONE],
|
||||
offset,
|
||||
@ -623,7 +623,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
|
||||
const { tasks, total } = await service.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
externalId,
|
||||
[ADMIN_ROLES.ADMIN, USER_ROLES.NONE],
|
||||
offset,
|
||||
@ -681,7 +681,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
|
||||
const { tasks, total } = await service.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
external_id,
|
||||
[USER_ROLES.AUTHOR],
|
||||
offset,
|
||||
@ -753,7 +753,7 @@ describe('TasksService', () => {
|
||||
const direction = 'ASC';
|
||||
|
||||
const { tasks, total } = await service.getTasks(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
external_id,
|
||||
[USER_ROLES.AUTHOR],
|
||||
offset,
|
||||
@ -839,7 +839,7 @@ describe('changeCheckoutPermission', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'typist-user-2', typistUserId: typistUserId_2 }],
|
||||
'author-user-external-id',
|
||||
@ -856,7 +856,7 @@ describe('changeCheckoutPermission', () => {
|
||||
const resultTask = await getTask(source, taskId);
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${typistUserId_2}`],
|
||||
{
|
||||
authorId: 'MY_AUTHOR_ID',
|
||||
@ -922,7 +922,7 @@ describe('changeCheckoutPermission', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'USER_GROUP_B', typistGroupId: userGroupId_2 }],
|
||||
'author-user-external-id',
|
||||
@ -940,7 +940,7 @@ describe('changeCheckoutPermission', () => {
|
||||
const resultTask = await getTask(source, taskId);
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${typistUserId_2}`],
|
||||
{
|
||||
authorId: 'MY_AUTHOR_ID',
|
||||
@ -992,7 +992,7 @@ describe('changeCheckoutPermission', () => {
|
||||
await createCheckoutPermissions(source, taskId, undefined, userGroupId);
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[],
|
||||
'author-user-external-id',
|
||||
@ -1045,7 +1045,7 @@ describe('changeCheckoutPermission', () => {
|
||||
|
||||
try {
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'not-exist-user', typistUserId: 999 }],
|
||||
'author-user-external-id',
|
||||
@ -1111,7 +1111,7 @@ describe('changeCheckoutPermission', () => {
|
||||
|
||||
try {
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'not-verified-user', typistUserId: typistUserId_2 }],
|
||||
'author-user-external-id',
|
||||
@ -1171,7 +1171,7 @@ describe('changeCheckoutPermission', () => {
|
||||
|
||||
try {
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'not-exist-user-group', typistGroupId: 999 }],
|
||||
'author-user-external-id',
|
||||
@ -1213,7 +1213,7 @@ describe('changeCheckoutPermission', () => {
|
||||
|
||||
try {
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'typist-user', typistUserId: typistUserId }],
|
||||
'author-user-external-id',
|
||||
@ -1265,7 +1265,7 @@ describe('changeCheckoutPermission', () => {
|
||||
|
||||
try {
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'typist-user', typistUserId: typistUserId }],
|
||||
'author-user-external-id',
|
||||
@ -1317,7 +1317,7 @@ describe('changeCheckoutPermission', () => {
|
||||
|
||||
try {
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'typist-user', typistUserId: typistUserId }],
|
||||
'author-user-external-id',
|
||||
@ -1383,7 +1383,7 @@ describe('changeCheckoutPermission', () => {
|
||||
|
||||
try {
|
||||
await service.changeCheckoutPermission(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
[{ typistName: 'typist-user-2', typistUserId: typistUserId_2 }],
|
||||
'author-user-external-id',
|
||||
@ -1460,7 +1460,7 @@ describe('checkout', () => {
|
||||
const initTask = await getTask(source, taskId);
|
||||
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['typist'],
|
||||
'typist-user-external-id',
|
||||
@ -1520,7 +1520,7 @@ describe('checkout', () => {
|
||||
const initTask = await getTask(source, taskId);
|
||||
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['typist'],
|
||||
'typist-user-external-id',
|
||||
@ -1573,7 +1573,7 @@ describe('checkout', () => {
|
||||
const initTask = await getTask(source, taskId);
|
||||
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['typist'],
|
||||
'typist-user-external-id',
|
||||
@ -1625,7 +1625,7 @@ describe('checkout', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
try {
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['typist'],
|
||||
'typist-user-external-id',
|
||||
@ -1672,7 +1672,7 @@ describe('checkout', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
try {
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['typist'],
|
||||
'typist-user-external-id',
|
||||
@ -1733,7 +1733,7 @@ describe('checkout', () => {
|
||||
|
||||
try {
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
audioFileId,
|
||||
['typist'],
|
||||
'typist-user-external-id',
|
||||
@ -1798,7 +1798,7 @@ describe('checkout', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
2,
|
||||
['typist'],
|
||||
'typist-user-external-id2',
|
||||
@ -1839,7 +1839,7 @@ describe('checkout', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
expect(
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['author'],
|
||||
'author-user-external-id',
|
||||
@ -1873,7 +1873,7 @@ describe('checkout', () => {
|
||||
|
||||
expect(
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['author'],
|
||||
'author-user-external-id',
|
||||
@ -1896,7 +1896,7 @@ describe('checkout', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
try {
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['author'],
|
||||
'author-user-external-id',
|
||||
@ -1937,7 +1937,7 @@ describe('checkout', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
try {
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['author'],
|
||||
'author-user-external-id',
|
||||
@ -1968,7 +1968,7 @@ describe('checkout', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
try {
|
||||
await service.checkout(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
['none'],
|
||||
'none-user-external-id',
|
||||
@ -2043,7 +2043,7 @@ describe('checkin', () => {
|
||||
const initTask = await getTask(source, taskId);
|
||||
|
||||
await service.checkin(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
);
|
||||
@ -2090,7 +2090,7 @@ describe('checkin', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
await expect(
|
||||
service.checkin(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
),
|
||||
@ -2142,7 +2142,7 @@ describe('checkin', () => {
|
||||
|
||||
await expect(
|
||||
service.checkin(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
),
|
||||
@ -2178,7 +2178,7 @@ describe('checkin', () => {
|
||||
|
||||
await expect(
|
||||
service.checkin(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
),
|
||||
@ -2243,7 +2243,7 @@ describe('suspend', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
|
||||
await service.suspend(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
);
|
||||
@ -2289,7 +2289,7 @@ describe('suspend', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
await expect(
|
||||
service.suspend(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
),
|
||||
@ -2341,7 +2341,7 @@ describe('suspend', () => {
|
||||
|
||||
await expect(
|
||||
service.checkin(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
),
|
||||
@ -2377,7 +2377,7 @@ describe('suspend', () => {
|
||||
|
||||
await expect(
|
||||
service.checkin(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
),
|
||||
@ -2443,7 +2443,7 @@ describe('cancel', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
|
||||
await service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['typist', 'standard'],
|
||||
@ -2492,7 +2492,7 @@ describe('cancel', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
|
||||
await service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['typist', 'standard'],
|
||||
@ -2544,7 +2544,7 @@ describe('cancel', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
|
||||
await service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['admin', 'author'],
|
||||
@ -2595,7 +2595,7 @@ describe('cancel', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
|
||||
await service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['admin', 'author'],
|
||||
@ -2645,7 +2645,7 @@ describe('cancel', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
await expect(
|
||||
service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['admin', 'author'],
|
||||
@ -2698,7 +2698,7 @@ describe('cancel', () => {
|
||||
|
||||
await expect(
|
||||
service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['typist', 'standard'],
|
||||
@ -2735,7 +2735,7 @@ describe('cancel', () => {
|
||||
|
||||
await expect(
|
||||
service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['typist', 'standard'],
|
||||
@ -2804,7 +2804,7 @@ describe('cancel', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
await service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
'typist-user-external-id',
|
||||
['typist', 'standard'],
|
||||
@ -2821,7 +2821,7 @@ describe('cancel', () => {
|
||||
expect(permisions[0].user_id).toEqual(typistUserId);
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${typistUserId}`],
|
||||
{
|
||||
authorId: 'AUTHOR_ID',
|
||||
@ -2914,7 +2914,7 @@ describe('cancel', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
await service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
external_id,
|
||||
role.split(' ') as Roles[],
|
||||
@ -2931,7 +2931,7 @@ describe('cancel', () => {
|
||||
expect(permisions[0].user_id).toEqual(autoRoutingTypistUserId);
|
||||
// 通知処理が想定通りの引数で呼ばれているか確認
|
||||
expect(NotificationHubService.notify).toHaveBeenCalledWith(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
[`user_${autoRoutingTypistUserId}`],
|
||||
{
|
||||
authorId: 'AUTHOR_ID',
|
||||
@ -2986,7 +2986,7 @@ describe('cancel', () => {
|
||||
NotificationhubService,
|
||||
);
|
||||
await service.cancel(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
1,
|
||||
external_id,
|
||||
role.split(' ') as Roles[],
|
||||
@ -3060,7 +3060,7 @@ describe('backup', () => {
|
||||
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
await service.backup(
|
||||
makeContext(admin.external_id, 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext(admin.external_id, 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
audioFileId,
|
||||
admin.external_id,
|
||||
);
|
||||
@ -3112,7 +3112,7 @@ describe('backup', () => {
|
||||
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
await service.backup(
|
||||
makeContext(admin.external_id, 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext(admin.external_id, 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
audioFileId,
|
||||
admin.external_id,
|
||||
);
|
||||
@ -3165,7 +3165,7 @@ describe('backup', () => {
|
||||
|
||||
try {
|
||||
await service.backup(
|
||||
makeContext(admin.external_id, 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext(admin.external_id, 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
audioFileId,
|
||||
admin.external_id,
|
||||
);
|
||||
@ -3220,7 +3220,7 @@ describe('backup', () => {
|
||||
|
||||
try {
|
||||
await service.backup(
|
||||
makeContext(admin.external_id, 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext(admin.external_id, 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
9999, // 存在しないタスクID
|
||||
admin.external_id,
|
||||
);
|
||||
@ -3281,7 +3281,7 @@ describe('backup', () => {
|
||||
|
||||
try {
|
||||
await service.backup(
|
||||
makeContext(admin.external_id, 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext(admin.external_id, 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
audioFileId,
|
||||
admin.external_id,
|
||||
);
|
||||
@ -3376,7 +3376,7 @@ describe('getNextTask', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3452,7 +3452,7 @@ describe('getNextTask', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3528,7 +3528,7 @@ describe('getNextTask', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3604,7 +3604,7 @@ describe('getNextTask', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3680,7 +3680,7 @@ describe('getNextTask', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3732,7 +3732,7 @@ describe('getNextTask', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -3783,7 +3783,7 @@ describe('getNextTask', () => {
|
||||
const service = module.get<TasksService>(TasksService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ describe('getTemplates', () => {
|
||||
const { account, admin } = await makeTestAccount(source, { tier: 5 });
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -82,7 +82,7 @@ describe('getTemplates', () => {
|
||||
const { admin } = await makeTestAccount(source, { tier: 5 });
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -104,7 +104,7 @@ describe('getTemplates', () => {
|
||||
const { admin } = await makeTestAccount(source, { tier: 5 });
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ describe('利用規約取得', () => {
|
||||
await createTermInfo(source, 'DPA', 'v1.0');
|
||||
await createTermInfo(source, 'DPA', 'v1.2');
|
||||
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const result = await service.getTermsInfo(context);
|
||||
|
||||
expect(result[0].documentType).toBe('EULA');
|
||||
@ -55,7 +55,7 @@ describe('利用規約取得', () => {
|
||||
const module = await makeTestingModule(source);
|
||||
if (!module) fail();
|
||||
const service = module.get<TermsService>(TermsService);
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTermsInfo(context)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -70,7 +70,7 @@ describe('利用規約取得', () => {
|
||||
if (!module) fail();
|
||||
const service = module.get<TermsService>(TermsService);
|
||||
await createTermInfo(source, 'DPA', 'v1.0');
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTermsInfo(context)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -85,7 +85,7 @@ describe('利用規約取得', () => {
|
||||
if (!module) fail();
|
||||
const service = module.get<TermsService>(TermsService);
|
||||
await createTermInfo(source, 'PrivacyNotice', 'v1.0');
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTermsInfo(context)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -100,7 +100,7 @@ describe('利用規約取得', () => {
|
||||
if (!module) fail();
|
||||
const service = module.get<TermsService>(TermsService);
|
||||
await createTermInfo(source, 'EULA', 'v1.0');
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.getTermsInfo(context)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
|
||||
@ -97,7 +97,7 @@ describe('UsersService.confirmUser', () => {
|
||||
// account id:1, user id: 2のトークン
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOjEsInVzZXJJZCI6MiwiZW1haWwiOiJ4eHhAeHh4Lnh4eCIsImlhdCI6MTAwMDAwMDAwMCwiZXhwIjo5MDAwMDAwMDAwfQ.26L6BdNg-3TbyKT62PswlJ6RPMkcTtHzlDXW2Uo9XbMPVSrl2ObcuS6EcXjFFN2DEfNTKbqX_zevIWMpHOAdLNgGhk528nLrBrNvPASqtTjvW9muxMXpjUdjRVkmVbOylBHWW3YpWL9JEbJQ7rAzWDfaIdPhMovdaxumnZt_UwnlnrdaVPLACW7tkH_laEcAU507iSiM4mqxxG8FuTs34t6PEdwRuzZAQPN2IOPYNSvGNdJYryPacSeSNZ_z1xeBYXLOLQfOBZzyTReYDOhXdikhrNUbxjgnZQlSXBCVMlZ9PH42bHfp-LJIeJzW0yqnF6oLklvJP-fo8eW0k5iDOw';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await service.confirmUser(context, token);
|
||||
//result
|
||||
const resultUser = await getUser(source, userId);
|
||||
@ -141,7 +141,7 @@ describe('UsersService.confirmUser', () => {
|
||||
if (!module) fail();
|
||||
const token = 'invalid.id.token';
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.confirmUser(context, token)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E000101'), HttpStatus.BAD_REQUEST),
|
||||
);
|
||||
@ -177,7 +177,7 @@ describe('UsersService.confirmUser', () => {
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOjEsInVzZXJJZCI6MiwiZW1haWwiOiJ4eHhAeHh4Lnh4eCIsImlhdCI6MTAwMDAwMDAwMCwiZXhwIjo5MDAwMDAwMDAwfQ.26L6BdNg-3TbyKT62PswlJ6RPMkcTtHzlDXW2Uo9XbMPVSrl2ObcuS6EcXjFFN2DEfNTKbqX_zevIWMpHOAdLNgGhk528nLrBrNvPASqtTjvW9muxMXpjUdjRVkmVbOylBHWW3YpWL9JEbJQ7rAzWDfaIdPhMovdaxumnZt_UwnlnrdaVPLACW7tkH_laEcAU507iSiM4mqxxG8FuTs34t6PEdwRuzZAQPN2IOPYNSvGNdJYryPacSeSNZ_z1xeBYXLOLQfOBZzyTReYDOhXdikhrNUbxjgnZQlSXBCVMlZ9PH42bHfp-LJIeJzW0yqnF6oLklvJP-fo8eW0k5iDOw';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.confirmUser(context, token)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E010202'), HttpStatus.BAD_REQUEST),
|
||||
);
|
||||
@ -189,7 +189,7 @@ describe('UsersService.confirmUser', () => {
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const token =
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOjEsInVzZXJJZCI6MiwiZW1haWwiOiJ4eHhAeHh4Lnh4eCIsImlhdCI6MTAwMDAwMDAwMCwiZXhwIjo5MDAwMDAwMDAwfQ.26L6BdNg-3TbyKT62PswlJ6RPMkcTtHzlDXW2Uo9XbMPVSrl2ObcuS6EcXjFFN2DEfNTKbqX_zevIWMpHOAdLNgGhk528nLrBrNvPASqtTjvW9muxMXpjUdjRVkmVbOylBHWW3YpWL9JEbJQ7rAzWDfaIdPhMovdaxumnZt_UwnlnrdaVPLACW7tkH_laEcAU507iSiM4mqxxG8FuTs34t6PEdwRuzZAQPN2IOPYNSvGNdJYryPacSeSNZ_z1xeBYXLOLQfOBZzyTReYDOhXdikhrNUbxjgnZQlSXBCVMlZ9PH42bHfp-LJIeJzW0yqnF6oLklvJP-fo8eW0k5iDOw';
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
await expect(service.confirmUser(context, token)).rejects.toEqual(
|
||||
new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
@ -246,7 +246,7 @@ describe('UsersService.confirmUserAndInitPassword', () => {
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOjEsInVzZXJJZCI6MiwiZW1haWwiOiJ4eHhAeHh4Lnh4eCIsImlhdCI6MTAwMDAwMDAwMCwiZXhwIjo5MDAwMDAwMDAwfQ.26L6BdNg-3TbyKT62PswlJ6RPMkcTtHzlDXW2Uo9XbMPVSrl2ObcuS6EcXjFFN2DEfNTKbqX_zevIWMpHOAdLNgGhk528nLrBrNvPASqtTjvW9muxMXpjUdjRVkmVbOylBHWW3YpWL9JEbJQ7rAzWDfaIdPhMovdaxumnZt_UwnlnrdaVPLACW7tkH_laEcAU507iSiM4mqxxG8FuTs34t6PEdwRuzZAQPN2IOPYNSvGNdJYryPacSeSNZ_z1xeBYXLOLQfOBZzyTReYDOhXdikhrNUbxjgnZQlSXBCVMlZ9PH42bHfp-LJIeJzW0yqnF6oLklvJP-fo8eW0k5iDOw';
|
||||
expect(
|
||||
await service.confirmUserAndInitPassword(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
token,
|
||||
),
|
||||
).toEqual(undefined);
|
||||
@ -296,7 +296,7 @@ describe('UsersService.confirmUserAndInitPassword', () => {
|
||||
const token = 'invalid.id.token';
|
||||
await expect(
|
||||
service.confirmUserAndInitPassword(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
token,
|
||||
),
|
||||
).rejects.toEqual(
|
||||
@ -352,7 +352,7 @@ describe('UsersService.confirmUserAndInitPassword', () => {
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOjEsInVzZXJJZCI6MiwiZW1haWwiOiJ4eHhAeHh4Lnh4eCIsImlhdCI6MTAwMDAwMDAwMCwiZXhwIjo5MDAwMDAwMDAwfQ.26L6BdNg-3TbyKT62PswlJ6RPMkcTtHzlDXW2Uo9XbMPVSrl2ObcuS6EcXjFFN2DEfNTKbqX_zevIWMpHOAdLNgGhk528nLrBrNvPASqtTjvW9muxMXpjUdjRVkmVbOylBHWW3YpWL9JEbJQ7rAzWDfaIdPhMovdaxumnZt_UwnlnrdaVPLACW7tkH_laEcAU507iSiM4mqxxG8FuTs34t6PEdwRuzZAQPN2IOPYNSvGNdJYryPacSeSNZ_z1xeBYXLOLQfOBZzyTReYDOhXdikhrNUbxjgnZQlSXBCVMlZ9PH42bHfp-LJIeJzW0yqnF6oLklvJP-fo8eW0k5iDOw';
|
||||
await expect(
|
||||
service.confirmUserAndInitPassword(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
token,
|
||||
),
|
||||
).rejects.toEqual(
|
||||
@ -405,7 +405,7 @@ describe('UsersService.confirmUserAndInitPassword', () => {
|
||||
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOjEsInVzZXJJZCI6MiwiZW1haWwiOiJ4eHhAeHh4Lnh4eCIsImlhdCI6MTAwMDAwMDAwMCwiZXhwIjo5MDAwMDAwMDAwfQ.26L6BdNg-3TbyKT62PswlJ6RPMkcTtHzlDXW2Uo9XbMPVSrl2ObcuS6EcXjFFN2DEfNTKbqX_zevIWMpHOAdLNgGhk528nLrBrNvPASqtTjvW9muxMXpjUdjRVkmVbOylBHWW3YpWL9JEbJQ7rAzWDfaIdPhMovdaxumnZt_UwnlnrdaVPLACW7tkH_laEcAU507iSiM4mqxxG8FuTs34t6PEdwRuzZAQPN2IOPYNSvGNdJYryPacSeSNZ_z1xeBYXLOLQfOBZzyTReYDOhXdikhrNUbxjgnZQlSXBCVMlZ9PH42bHfp-LJIeJzW0yqnF6oLklvJP-fo8eW0k5iDOw';
|
||||
await expect(
|
||||
service.confirmUserAndInitPassword(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
token,
|
||||
),
|
||||
).rejects.toEqual(
|
||||
@ -491,7 +491,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
expect(
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -579,7 +579,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
expect(
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -670,7 +670,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
expect(
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -758,7 +758,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
expect(
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -851,7 +851,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -871,7 +871,7 @@ describe('UsersService.createUser', () => {
|
||||
// ADB2Cに作成したユーザーを削除するメソッドが呼ばれていることを確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
|
||||
@ -938,7 +938,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -963,7 +963,7 @@ describe('UsersService.createUser', () => {
|
||||
// ADB2Cに作成したユーザーを削除するメソッドが呼ばれていることを確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
|
||||
@ -1019,7 +1019,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -1098,7 +1098,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -1179,7 +1179,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
expect(
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -1220,7 +1220,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -1316,7 +1316,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -1344,7 +1344,7 @@ describe('UsersService.createUser', () => {
|
||||
// ADB2Cに作成したユーザーを削除するメソッドが呼ばれていることを確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
|
||||
@ -1405,7 +1405,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -1431,7 +1431,7 @@ describe('UsersService.createUser', () => {
|
||||
// ADB2Cに作成したユーザーを削除するメソッドが呼ばれていることを確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
|
||||
@ -1497,7 +1497,7 @@ describe('UsersService.createUser', () => {
|
||||
|
||||
try {
|
||||
await service.createUser(
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
adminExternalId,
|
||||
name,
|
||||
role,
|
||||
@ -1521,7 +1521,7 @@ describe('UsersService.createUser', () => {
|
||||
// ADB2Cに作成したユーザーを削除するメソッドが呼ばれていることを確認
|
||||
expect(b2cService.deleteUser).toBeCalledWith(
|
||||
externalId,
|
||||
makeContext('trackingId', 'xxx.xxx.xxx.xxx', 'requestId'),
|
||||
makeContext('trackingId', 'xxx-xxx-xxx-xxx', 'requestId'),
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -1644,7 +1644,7 @@ describe('UsersService.getUsers', () => {
|
||||
},
|
||||
];
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(await service.getUsers(context, externalId_author)).toEqual(
|
||||
expectedUsers,
|
||||
);
|
||||
@ -1763,7 +1763,7 @@ describe('UsersService.getUsers', () => {
|
||||
},
|
||||
];
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
expect(await service.getUsers(context, external_id1)).toEqual(
|
||||
expectedUsers,
|
||||
);
|
||||
@ -1787,7 +1787,7 @@ describe('UsersService.getUsers', () => {
|
||||
prompt: false,
|
||||
});
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await expect(
|
||||
service.getUsers(context, 'externalId_failed'),
|
||||
@ -1815,7 +1815,7 @@ describe('UsersService.getUsers', () => {
|
||||
prompt: false,
|
||||
});
|
||||
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await expect(service.getUsers(context, externalId_author)).rejects.toEqual(
|
||||
new HttpException(makeErrorResponse('E009999'), HttpStatus.NOT_FOUND),
|
||||
@ -1840,7 +1840,7 @@ describe('UsersService.updateSortCriteria', () => {
|
||||
configMockValue,
|
||||
sortCriteriaRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateSortCriteria(
|
||||
@ -1871,7 +1871,7 @@ describe('UsersService.updateSortCriteria', () => {
|
||||
configMockValue,
|
||||
sortCriteriaRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await expect(
|
||||
service.updateSortCriteria(context, 'AUTHOR_ID', 'ASC', 'external_id'),
|
||||
@ -1903,7 +1903,7 @@ describe('UsersService.updateSortCriteria', () => {
|
||||
configMockValue,
|
||||
sortCriteriaRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await expect(
|
||||
service.updateSortCriteria(context, 'AUTHOR_ID', 'ASC', 'external_id'),
|
||||
@ -1933,7 +1933,7 @@ describe('UsersService.getSortCriteria', () => {
|
||||
configMockValue,
|
||||
sortCriteriaRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(await service.getSortCriteria(context, 'external_id')).toEqual({
|
||||
direction: 'ASC',
|
||||
@ -1962,7 +1962,7 @@ describe('UsersService.getSortCriteria', () => {
|
||||
configMockValue,
|
||||
sortCriteriaRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await expect(
|
||||
service.getSortCriteria(context, 'external_id'),
|
||||
@ -1997,7 +1997,7 @@ describe('UsersService.getSortCriteria', () => {
|
||||
configMockValue,
|
||||
sortCriteriaRepositoryMockValue,
|
||||
);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await expect(
|
||||
service.getSortCriteria(context, 'external_id'),
|
||||
@ -2057,7 +2057,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateUser(
|
||||
@ -2116,7 +2116,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateUser(
|
||||
@ -2175,7 +2175,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateUser(
|
||||
@ -2234,7 +2234,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateUser(
|
||||
@ -2293,7 +2293,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateUser(
|
||||
@ -2352,7 +2352,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await expect(
|
||||
service.updateUser(
|
||||
@ -2401,7 +2401,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateUser(
|
||||
@ -2460,7 +2460,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
expect(
|
||||
await service.updateUser(
|
||||
@ -2519,7 +2519,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await expect(
|
||||
service.updateUser(
|
||||
@ -2579,7 +2579,7 @@ describe('UsersService.updateUser', () => {
|
||||
});
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const context = makeContext(`uuidv4`, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(`uuidv4`, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
await expect(
|
||||
service.updateUser(
|
||||
@ -2627,7 +2627,7 @@ describe('UsersService.updateAcceptedVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 5,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.updateAcceptedVersion(
|
||||
@ -2648,7 +2648,7 @@ describe('UsersService.updateAcceptedVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 4,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.updateAcceptedVersion(
|
||||
@ -2671,7 +2671,7 @@ describe('UsersService.updateAcceptedVersion', () => {
|
||||
const { admin } = await makeTestAccount(source, {
|
||||
tier: 4,
|
||||
});
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await expect(
|
||||
@ -2714,7 +2714,7 @@ describe('UsersService.getUserName', () => {
|
||||
try {
|
||||
const module = await makeTestingModule(source);
|
||||
if (!module) fail();
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.getUserName(context, 'external_id');
|
||||
@ -2809,7 +2809,7 @@ describe('UsersService.getRelations', () => {
|
||||
expect(workflows[3].author_id).toBe(user2);
|
||||
}
|
||||
|
||||
const context = makeContext(external_id, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(external_id, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const relations = await service.getRelations(context, external_id);
|
||||
@ -2872,7 +2872,7 @@ describe('UsersService.getRelations', () => {
|
||||
expect(workflows[0].author_id).toBe(user2);
|
||||
}
|
||||
|
||||
const context = makeContext(external_id, 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(external_id, 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
const relations = await service.getRelations(context, external_id);
|
||||
@ -2898,7 +2898,7 @@ describe('UsersService.getRelations', () => {
|
||||
try {
|
||||
const module = await makeTestingModule(source);
|
||||
if (!module) fail();
|
||||
const context = makeContext(uuidv4(), 'xxx.xxx.xxx.xxx', 'requestId');
|
||||
const context = makeContext(uuidv4(), 'xxx-xxx-xxx-xxx', 'requestId');
|
||||
|
||||
const service = module.get<UsersService>(UsersService);
|
||||
await service.getRelations(context, 'external_id');
|
||||
|
||||
@ -120,7 +120,7 @@ describe('getWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -196,7 +196,7 @@ describe('getWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -222,7 +222,7 @@ describe('getWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -306,7 +306,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -375,7 +375,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -443,7 +443,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -505,7 +505,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -573,7 +573,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -650,7 +650,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
//実行結果を確認
|
||||
@ -711,7 +711,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -776,7 +776,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -840,7 +840,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -906,7 +906,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -978,7 +978,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1044,7 +1044,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1119,7 +1119,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1190,7 +1190,7 @@ describe('createWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1313,7 +1313,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1407,7 +1407,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1500,7 +1500,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1587,7 +1587,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1694,7 +1694,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1777,7 +1777,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1824,7 +1824,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1902,7 +1902,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -1975,7 +1975,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2047,7 +2047,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2126,7 +2126,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2211,7 +2211,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2290,7 +2290,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2363,7 +2363,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2436,7 +2436,7 @@ describe('updateWorkflow', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2531,7 +2531,7 @@ describe('deleteWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2586,7 +2586,7 @@ describe('deleteWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2641,7 +2641,7 @@ describe('deleteWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2720,7 +2720,7 @@ describe('deleteWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
@ -2779,7 +2779,7 @@ describe('deleteWorkflows', () => {
|
||||
const service = module.get<WorkflowsService>(WorkflowsService);
|
||||
const context = makeContext(
|
||||
admin.external_id,
|
||||
'xxx.xxx.xxx.xxx',
|
||||
'xxx-xxx-xxx-xxx',
|
||||
'requestId',
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user