Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Add TPL integration tests #145

Merged
merged 5 commits into from
Sep 28, 2018
Merged

Add TPL integration tests #145

merged 5 commits into from
Sep 28, 2018

Conversation

facuspagnuolo
Copy link
Contributor

Fixes #135

contract('ZEPToken', ([ _, owner, another, jurisdiction]) => {
const attributeID = 0;
contract('ZEPToken', ([ _, tokenOwner, another, jurisdictionOwner, validatorOwner, zeppelin ]) => {
const receiveTokensAttributeID = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use a non-zero ID for testing, because EVM


function assertTokensCannotBeTransferred() {
it('cannot transfer', async function () {
assert.equal(await this.zepToken.canTransfer(recipient, amount, { from: sender }), false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: why not should?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, the token approvals fail when using should

})
}

describe('when the no one was not allowed to receive tokens', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the no one" sounds like a creature out of H P Lovecraft :-P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad copy paste 😂

@spalladino
Copy link
Contributor

Looks good! Left some very minor comments. Something that came to my mind though: if the tokens do reach an unintended owner, we have no way to actually freeze them. We can only control recipients in txs, but not senders. Should we consider adding a check in TPLToken that the whitelist attribute is required for both sender and recipient, and not just recipient?

@spalladino
Copy link
Contributor

@facuspagnuolo note there are conflicts on Vouching.test.js, I think we can merge right after they are resolved

@spalladino spalladino added the status:ready-to-merge Order mergify to merge label Sep 28, 2018
@mergify mergify bot merged commit c5019dd into master Sep 28, 2018
@facuspagnuolo facuspagnuolo deleted the add_tpl_integration_tests branch September 28, 2018 22:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready-to-merge Order mergify to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants