-
-
Notifications
You must be signed in to change notification settings - Fork 261
Add new method addCollectibleVerifyOwnership
#635
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
Conversation
7314c2a to
4d638db
Compare
419cc66 to
8fdec38
Compare
| image: 'image', | ||
| description: 'description', | ||
| standard: 'standard', | ||
| describe('addCollectibleVerifyOwnership', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLDR: I reorganized the tests such that each major method has its own describe block.
| image: 'image', | ||
| description: 'description', | ||
| standard: 'standard', | ||
| it('should throw an error if selected address is not owner of input collectible', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only new test in this file. The rest are just shuffled around.
8fdec38 to
ab88d1f
Compare
addCollectibleVerifyOwnership
gantunesr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a little nit, the method name, but I have no better suggestion
| }); | ||
| }); | ||
|
|
||
| it('should add collectible by selected address', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this test is no longer preset. Was it removed accidentally?
I see that there is now an equivalent test for your new method, but not for addCollectible, which is what this tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I replaced it with a test for my method. I will add it back for addCollectible and rename it slightly and keep it for testing the new method as well? Sound good @Gudahtt?
|
@wachunei @gantunesr just added a test! @Gudahtt should be good for another look. |
Gudahtt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* add addCollectibleVerifyOwnership method for manually added collectibles * update tests * address feedback
* add addCollectibleVerifyOwnership method for manually added collectibles * update tests * address feedback
It seemed to not make much sense to make a call to the CollectiblesController in the background to validate ownership, immediately before calling the same controller to add that collectible. This PR adds a new method
addCollectibleVerifyOwnershipwhich wraps the addCollectible method together with the validation step.