Skip to content

Commit 02e980f

Browse files
Dispenser tests (#514)
* Setting up initial dispenser tests * Testing making user1 minter * Creating dispenser & testing all fields * Creating deactivate dispenser test * Fixing handleDeactivate in dispenser * Adding test for updating allowed swapper * Writting test for owner withdrawing all datatokens from dispenser
1 parent 82ce88c commit 02e980f

File tree

3 files changed

+489
-1
lines changed

3 files changed

+489
-1
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"deploy:local-barge": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml -l $npm_package_version --debug --ipfs http://172.15.0.16:5001 --node http://172.15.0.15:8020",
2525
"test": "npm run codegen && npm run lint && npm run type-check",
2626
"test-integration": "TS_NODE_PROJECT='test/integration/tsconfig.json' mocha --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/**/*.test.ts'",
27+
"test-dispenser": "TS_NODE_PROJECT='test/integration/tsconfig.json' mocha --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/Dispenser.test.ts'",
2728
"test-fixed": "TS_NODE_PROJECT='test/integration/tsconfig.json' mocha --config=test/integration/.mocharc.json --node-env=test --exit 'test/integration/FixedRateExchange.test.ts'",
2829
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .",
2930
"lint:fix": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx . --fix",

src/mappings/dispenser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function handleDeactivate(event: DispenserDeactivated): void {
6666
event.params.datatokenAddress
6767
)
6868
const dispenser = getDispenser(dispenserID)
69-
dispenser.active = true
69+
dispenser.active = false
7070
dispenser.save()
7171
}
7272

0 commit comments

Comments
 (0)