feat: 实现 Sense 本地事件只读查看 (#73)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import request from '@/utils/request'
|
||||
import { getLocalEvent, listLocalEvents } from '@/api/sense/local-event'
|
||||
|
||||
jest.mock('@/utils/request', () => jest.fn())
|
||||
|
||||
describe('Sense local event API', () => {
|
||||
beforeEach(() => request.mockReset())
|
||||
|
||||
test('uses read-only local endpoints', () => {
|
||||
listLocalEvents({ pageIndex: 1, pageSize: 10 })
|
||||
getLocalEvent('event/unsafe')
|
||||
expect(request).toHaveBeenNthCalledWith(1, { url: '/api/v1/local-events', method: 'get', params: { pageIndex: 1, pageSize: 10 }})
|
||||
expect(request).toHaveBeenNthCalledWith(2, { url: '/api/v1/local-events/event%2Funsafe', method: 'get' })
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user