feat(M08-C): 建立管理员房态运营入口
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { buildApp } from '../dist/app.js';
|
||||
import { signAccessToken } from '../dist/auth/jwt.js';
|
||||
|
||||
const secret = 'test-only-pricing-jwt-secret-with-32-characters';
|
||||
const pricingSource = readFileSync(
|
||||
join(dirname(dirname(fileURLToPath(import.meta.url))), 'src/orders/pricing-repository.ts'),
|
||||
'utf8'
|
||||
);
|
||||
assert.match(pricingSource, /r\.category_id AS roomCategoryId/);
|
||||
assert.doesNotMatch(pricingSource, /r\.room_category_id AS roomCategoryId/);
|
||||
const token = signAccessToken({
|
||||
sub: '21',
|
||||
sid: '5c4d3af8-c63c-4edb-bf95-b84127bb3f6e',
|
||||
|
||||
Reference in New Issue
Block a user