Add onboarding weather and template gradients
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
const { pruneStaleOnboardingDevices } = require('../src/db/common');
|
||||
|
||||
test('prunes old unbound onboarding devices without deleting completed bindings', async () => {
|
||||
let queryText = '';
|
||||
const pool = {
|
||||
async query(sql) {
|
||||
queryText = sql;
|
||||
return [[]];
|
||||
}
|
||||
};
|
||||
|
||||
await pruneStaleOnboardingDevices(pool);
|
||||
|
||||
assert.match(queryText, /modified_at < \(CURRENT_TIMESTAMP - INTERVAL 1 MINUTE\)/);
|
||||
assert.match(queryText, /WHERE screen_id IS NULL/);
|
||||
assert.doesNotMatch(queryText, /d_players\.identifier = d_onboarding_devices\.device_id/);
|
||||
});
|
||||
Reference in New Issue
Block a user