mirror of
https://github.com/koel/koel
synced 2024-12-21 01:53:11 +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' })
|
||
|
})
|
||
|
}
|
||
|
}
|