Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve adding domains #268

Merged
merged 3 commits into from
Jul 10, 2018
Merged

Improve adding domains #268

merged 3 commits into from
Jul 10, 2018

Conversation

elenadimitrova
Copy link
Contributor

@elenadimitrova elenadimitrova commented Jul 5, 2018

@@ -283,8 +283,8 @@ contract("Meta Colony", accounts => {
});

it("should NOT be able to add a child local skill more than one level from the root local skill", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

This test description should probably talk about domains rather than skills now.

auth
localSkill(_parentSkillId)
Copy link
Member

Choose a reason for hiding this comment

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

We don't need it now because of the require(_parentDomainId == 1, "colony-parent-skill-not-root");, but worth throwing in the domainExists modifier here now to save us forgetting to in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this wasn't a breaking change for us in the future I didn't think to include it but it doesn't hurt to be future-proof.

@@ -343,25 +343,6 @@ contract("Meta Colony", accounts => {
assert.equal(rootSkillChild3.toNumber(), 6);
});

it("should NOT be able to add a child local skill more than one level from the root local skill", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Why delete these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • should NOT be able to add a child local skill more than one level from the root local skill is already covered by should NOT be able to add a child domain more than one level away from the root domain
  • should NOT be able to add a child local skill to a global skill parent - is no longer relevant. Passing in a domain id in and creating the local skills within the same call ensures we cannot add a domain against a global skill

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was actually tempted to merge the when adding domains in the meta colony and when adding domains in a regular colony as there is nothing special in the meta colony setup as far as domains are concerned. What do you think?

@elenadimitrova elenadimitrova merged commit 2e5a28d into develop Jul 10, 2018
@elenadimitrova elenadimitrova deleted the fix/266-add-domain branch July 10, 2018 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local skills tree not enforced to be colony specific
2 participants