Skip to content

Commit

Permalink
Adapting the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed May 7, 2024
1 parent ac191f7 commit 3e17e9f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ This plugin is upgradeable.
#### Methods

```solidity
function initialize(IDAO _dao, string _firstBlockContentUri, address predecessorSpace);
function initialize(IDAO _dao, string _firstContentUri, address predecessorSpace);
function publishEdits(uint32 _blockIndex, uint32 _itemIndex, string _contentUri);
function publishEdits(string _contentUri);
function acceptSubspace(address _dao);
function acceptSubspace(address _subspaceDao);
function removeSubspace(address _dao);
function removeSubspace(address _subspaceDao);
```

Inherited:
Expand All @@ -282,10 +282,10 @@ function implementation() returns (address);
#### Events

```solidity
event EditsPublished(uint32 blockIndex, uint32 itemIndex, string contentUri);
event SuccessorSpaceCreated(address predecessorSpace);
event SubspaceAccepted(address dao);
event SubspaceRemoved(address dao);
event EditsPublished(address dao, string contentUri);
event SuccessorSpaceCreated(address dao, address predecessorSpaceDao);
event SubspaceAccepted(address dao, address subspaceDao);
event SubspaceRemoved(address dao, address subspaceDao);
```

#### Permissions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ export const defaultInitData: InitData = {
export const psvpInterface = new ethers.utils.Interface([
'function initialize(address)',
'function executeProposal(bytes,tuple(address,uint256,bytes)[],uint256)',
'function isEditor(address _account) view returns (bool)',
'function isMember(address _account) view returns (bool)',
'function submitAcceptSubspace(address _subspaceDao, address _spacePlugin)',
'function submitEdits(string _contentUri, address _spacePlugin)',
'function submitNewEditor(address _newEditor)',
'function submitNewMember(address _newMember)',
'function submitRemoveEditor(address _editor)',
'function submitRemoveMember(address _member)',
'function submitRemoveSubspace(address _subspaceDao, address _spacePlugin)',
]);

describe('Personal Space Admin Plugin', function () {
Expand Down Expand Up @@ -233,7 +242,7 @@ describe('Personal Space Admin Plugin', function () {
.executeProposal('0x', actions, 0)
)
.to.emit(spacePlugin, 'EditsPublished')
.withArgs('0x');
.withArgs(dao.address, '0x');
});

it('Executed content proposals emit an event', async () => {
Expand Down Expand Up @@ -264,7 +273,7 @@ describe('Personal Space Admin Plugin', function () {
.executeProposal('0x', actions, 0)
)
.to.emit(spacePlugin, 'EditsPublished')
.withArgs('0x');
.withArgs(dao.address, '0x');
});

it('Approved subspaces emit an event', async () => {
Expand Down Expand Up @@ -295,7 +304,7 @@ describe('Personal Space Admin Plugin', function () {
.executeProposal('0x', actions, 0)
)
.to.emit(spacePlugin, 'SubspaceAccepted')
.withArgs(ADDRESS_TWO);
.withArgs(dao.address, ADDRESS_TWO);
});

it('Removed subspaces emit an event', async () => {
Expand Down Expand Up @@ -340,7 +349,7 @@ describe('Personal Space Admin Plugin', function () {
.executeProposal('0x', actionsRemove, 0)
)
.to.emit(spacePlugin, 'SubspaceRemoved')
.withArgs(ADDRESS_TWO);
.withArgs(dao.address, ADDRESS_TWO);
});
});

Expand Down

0 comments on commit 3e17e9f

Please sign in to comment.