Skip to content

Commit

Permalink
move permission manager to its own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekard0 committed Sep 21, 2023
1 parent 8ef836e commit 727ab8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/subgraph/tests/helpers/method-classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ class PermissionMethods extends Permission {
this.actor = actor;
this.condition = condition;

this.dao = null;
this.pluginRepo = null;

return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import {Address} from '@graphprotocol/graph-ts';

import {handleGranted, handleRevoked} from '../../src/dao/dao_v1_0_0';

import {DAO_ADDRESS} from '../constants';
import {getEXECUTE_PERMISSION_ID} from './utils';
import {CONTRACT_ADDRESS, DAO_ADDRESS} from '../constants';
import {ExtendedPermission} from '../helpers/extended-schema';

const daoId = Address.fromString(DAO_ADDRESS).toHexString();
const pluginRepoId = Address.fromString(CONTRACT_ADDRESS).toHexString();

// DAO
test('Run dao (handleGranted) mappings with mock event', () => {
let permission = new ExtendedPermission().withDefaultValues(daoId);
permission.dao = daoId;
Expand All @@ -19,7 +20,7 @@ test('Run dao (handleGranted) mappings with mock event', () => {
handleGranted(grantedEvent);

// checks
permission.assertEntity();
permission.assertEntity(true);

clearStore();
});
Expand Down

0 comments on commit 727ab8f

Please sign in to comment.