UniversityDAO / udao

The official UniversityDAO DApp repository.
GNU Lesser General Public License v2.1
4 stars 4 forks source link

Add completed test script for ERC721, blank scripts for Governance, ERC20 contracts #25

Closed oslfmt closed 2 years ago

oslfmt commented 2 years ago

This PR intends to add full test scripts to all our smart contracts to make sure all the essential functions are working as expected. Each contract will have it's own test file, each of which has a suite of tests relating to the contract.

The most important things to test are permissions, e.g., only members can create proposals and vote on them. To do that we'll have to test the hooking up of ERC721 and our governance contract.

Most functions don't need to be tested though, since they're from OZ.

Edit: the PR scope was changed to only add a complete test script for MembershipNFT. Blank scripts were added and some minor changes were made to MembershipNFT, most notably to the constructor.

oslfmt commented 2 years ago

Awesome. Just added requested changes and merged. I assumed you wanted the comment on the actual function, not the constructor. In the future, you can add a small comment directly in the code for comments/questions related to a specific line of code, and more general comments in the main thread, just fyi :+1: