2018-10-18 09:19:10 +02:00
|
|
|
import {assert} from "chai"
|
2018-10-16 14:56:18 +02:00
|
|
|
import config from "../config"
|
2018-11-07 14:33:56 +01:00
|
|
|
import TestContractHandler from "./TestContractHandler"
|
2019-03-21 02:56:58 +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
|
|
|
|
|
|
|
|
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
|
|
|
})
|
|
|
|
|
2018-10-05 12:34:18 +02:00
|
|
|
describe("public interface", () => {
|
|
|
|
|
2019-01-28 15:41:19 +01:00
|
|
|
it("should have dispenser", () => {
|
|
|
|
assert(keeper.dispenser !== null)
|
2018-10-05 12:34:18 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
it("should have token", () => {
|
|
|
|
assert(keeper.token !== null)
|
|
|
|
})
|
2018-10-16 14:56:18 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
describe("#getNetworkName()", () => {
|
2018-10-05 12:34:18 +02:00
|
|
|
|
2018-10-16 14:56:18 +02:00
|
|
|
it("should get development as default", async () => {
|
|
|
|
const networkName: string = await keeper.getNetworkName()
|
2018-11-14 09:36:37 +01:00
|
|
|
assert(networkName === "Development")
|
2018-10-05 12:34:18 +02:00
|
|
|
})
|
2018-10-16 14:56:18 +02:00
|
|
|
|
2018-10-05 12:34:18 +02:00
|
|
|
})
|
|
|
|
})
|