Skip to content

Commit ac9af24

Browse files
committed
fix: test
1 parent 7362e6d commit ac9af24

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

mobile/openapi/lib/model/system_config_o_auth_dto.dart

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

open-api/typescript-sdk/src/fetch-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ export type SystemConfigOAuthDto = {
13161316
buttonText: string;
13171317
clientId: string;
13181318
clientSecret: string;
1319-
defaultStorageQuota: number;
1319+
defaultStorageQuota: number | null;
13201320
enabled: boolean;
13211321
issuerUrl: string;
13221322
mobileOverrideEnabled: boolean;

server/src/services/auth.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ describe(AuthService.name, () => {
702702
expect(mocks.user.create).toHaveBeenCalledWith(expect.objectContaining({ quotaSizeInBytes: 1_073_741_824 }));
703703
});
704704

705-
it('should not set quota for 0 quota', async () => {
705+
it('should set quota for 0 quota', async () => {
706706
const user = factory.userAdmin({ oauthId: 'oauth-id' });
707707

708708
mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthWithStorageQuota);
@@ -724,7 +724,7 @@ describe(AuthService.name, () => {
724724
email: user.email,
725725
name: ' ',
726726
oauthId: user.oauthId,
727-
quotaSizeInBytes: null,
727+
quotaSizeInBytes: 0,
728728
storageLabel: null,
729729
});
730730
});

server/src/services/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class AuthService extends BaseService {
300300
name: userName,
301301
email: profile.email,
302302
oauthId: profile.sub,
303-
quotaSizeInBytes: storageQuota !== null ? storageQuota * HumanReadableSize.GiB : null,
303+
quotaSizeInBytes: storageQuota === null ? null : storageQuota * HumanReadableSize.GiB,
304304
storageLabel: storageLabel || null,
305305
});
306306
}

server/src/services/system-config.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
112112
buttonText: 'Login with OAuth',
113113
clientId: '',
114114
clientSecret: '',
115-
defaultStorageQuota: 0,
115+
defaultStorageQuota: null,
116116
enabled: false,
117117
issuerUrl: '',
118118
mobileOverrideEnabled: false,

0 commit comments

Comments
 (0)