Skip to content

Commit db17c00

Browse files
committed
postgres test
1 parent ce3c6d1 commit db17c00

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

spec/AuthDataUniqueIndex.spec.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,19 @@ describe('AuthData Unique Index', () => {
122122
});
123123

124124
it('should skip startup index creation when createIndexAuthDataUniqueness is false', async () => {
125-
await reconfigureServer({
126-
auth: { fakeAuthProvider },
127-
databaseAdapter: undefined,
128-
databaseOptions: { createIndexAuthDataUniqueness: false },
129-
});
130125
const config = Config.get('test');
131126
const adapter = config.database.adapter;
132127
const spy = spyOn(adapter, 'ensureAuthDataUniqueness').and.callThrough();
133128

134-
// Trigger performInitialization again to verify the option is respected
129+
// Temporarily set the option to false
130+
const originalOptions = config.database.options.databaseOptions;
131+
config.database.options.databaseOptions = { createIndexAuthDataUniqueness: false };
132+
135133
await config.database.performInitialization();
136134
expect(spy).not.toHaveBeenCalled();
135+
136+
// Restore original options
137+
config.database.options.databaseOptions = originalOptions;
137138
});
138139

139140
it('should handle calling ensureAuthDataUniqueness multiple times via cache', async () => {

0 commit comments

Comments
 (0)