Skip to content

Commit

Permalink
Add further test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Jul 25, 2024
1 parent 0f116c8 commit 2d18898
Show file tree
Hide file tree
Showing 4 changed files with 790 additions and 173 deletions.
14 changes: 12 additions & 2 deletions src/domain/notifications/notifications.repository.v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ export class NotificationsRepositoryV2 implements INotificationsRepositoryV2 {
throw new UnauthorizedException();
}

return this.notificationsDatasource.getSafeSubscription(args);
return this.notificationsDatasource.getSafeSubscription({
account: args.account,
deviceUuid: args.deviceUuid,
chainId: args.chainId,
safeAddress: args.safeAddress,
});
}

// Note: no authentication required as not controller focused
Expand Down Expand Up @@ -190,7 +195,12 @@ export class NotificationsRepositoryV2 implements INotificationsRepositoryV2 {
throw new UnauthorizedException();
}

return this.notificationsDatasource.deleteSubscription(args);
return this.notificationsDatasource.deleteSubscription({
account: args.account,
deviceUuid: args.deviceUuid,
chainId: args.chainId,
safeAddress: args.safeAddress,
});
}

deleteDevice(args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('UpsertSubscriptionsDtoSchema', () => {
expect(!result.success && result.error.issues).toStrictEqual([
{
code: 'invalid_string',
message: 'Invalid uuid',
message: 'Invalid UUID',
path: ['deviceUuid'],
validation: 'uuid',
},
Expand Down
Loading

0 comments on commit 2d18898

Please sign in to comment.