2019-06-20 00:20:09 +02:00
|
|
|
import { assert } from 'chai'
|
|
|
|
import config from '../config'
|
|
|
|
import TestContractHandler from './TestContractHandler'
|
2020-01-30 22:08:18 +01:00
|
|
|
import Keeper from '../../../src/keeper/Keeper'
|
|
|
|
import { Ocean } from '../../../src/ocean/Ocean'
|
2018-10-05 12:34:18 +02:00
|
|
|
|
|
|
|
let keeper: Keeper
|
|
|
|
|
2019-06-20 00:20:09 +02:00
|
|
|
describe('Keeper', () => {
|
2018-10-19 12:27:46 +02:00
|
|
|
before(async () => {
|
2018-11-07 14:33:56 +01:00
|
|
|
await TestContractHandler.prepareContracts()
|
2019-03-21 02:56:58 +01:00
|
|
|
const ocean = await Ocean.getInstance(config)
|
|
|
|
keeper = ocean.keeper
|
2018-10-19 12:27:46 +02:00
|
|
|
})
|
|
|
|
|
2019-06-20 00:20:09 +02:00
|
|
|
describe('public interface', () => {
|
|
|
|
it('should have dispenser', () => {
|
2019-01-28 15:41:19 +01:00
|
|
|
assert(keeper.dispenser !== null)
|
2018-10-05 12:34:18 +02:00
|
|
|
})
|
|
|
|
|
2019-06-20 00:20:09 +02:00
|
|
|
it('should have token', () => {
|
2018-10-05 12:34:18 +02:00
|
|
|
assert(keeper.token !== null)
|
|
|
|
})
|
2018-10-16 14:56:18 +02:00
|
|
|
})
|
|
|
|
|
2019-06-20 00:20:09 +02:00
|
|
|
describe('#getNetworkName()', () => {
|
|
|
|
it('should get development as default', async () => {
|
2018-10-16 14:56:18 +02:00
|
|
|
const networkName: string = await keeper.getNetworkName()
|
2019-06-20 00:20:09 +02:00
|
|
|
assert(networkName === 'Development')
|
2018-10-05 12:34:18 +02:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|