mirror of
https://github.com/koel/koel
synced 2024-12-25 03:53:05 +00:00
17 lines
489 B
TypeScript
17 lines
489 B
TypeScript
|
import { expect, it } from 'vitest'
|
||
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||
|
import { http } from '@/services'
|
||
|
import { plusService as service } from './plusService'
|
||
|
|
||
|
new class extends UnitTestCase {
|
||
|
protected test () {
|
||
|
it('activates license', async () => {
|
||
|
const postMock = this.mock(http, 'post').mockResolvedValue({})
|
||
|
|
||
|
await service.activateLicense('abc123')
|
||
|
|
||
|
expect(postMock).toHaveBeenCalledWith('licenses/activate', { key: 'abc123' })
|
||
|
})
|
||
|
}
|
||
|
}
|