git.delta.rocks / unique-network / refs/commits / 74ad9c34019c

difftreelog

tests: add tests for restriction disabling

Yaroslav Bolyukin2021-02-19parent: #94a4122.patch.diff
in: master

1 file changed

modifiedtests/src/setCollectionLimits.test.tsdiffbeforeafterboth
14 createCollectionExpectSuccess, getCreatedCollectionCount,14 createCollectionExpectSuccess, getCreatedCollectionCount,
15 getCreateItemResult,15 getCreateItemResult,
16 getDetailedCollectionInfo,16 getDetailedCollectionInfo,
17 setCollectionLimitsExpectFailure,
18 setCollectionLimitsExpectSuccess,
17} from './util/helpers';19} from './util/helpers';
1820
19chai.use(chaiAsPromised);21chai.use(chaiAsPromised);
132 });134 });
133 });135 });
136
137 it('fails when trying to enable OwnerCanTransfer after it was disabled', async () => {
138 const collectionId = await createCollectionExpectSuccess();
139 await setCollectionLimitsExpectSuccess(alice, collectionId, { OwnerCanTransfer: false });
140 await setCollectionLimitsExpectFailure(alice, collectionId, { OwnerCanTransfer: true });
141 });
142
143 it('fails when trying to enable OwnerCanDestroy after it was disabled', async () => {
144 const collectionId = await createCollectionExpectSuccess();
145 await setCollectionLimitsExpectSuccess(alice, collectionId, { OwnerCanDestroy: false });
146 await setCollectionLimitsExpectFailure(alice, collectionId, { OwnerCanDestroy: true });
147 });
134});148});
135149