cosmos / b9-checkers-academy-draft

32 stars 40 forks source link

full_game_test; `TestGetAddressWrongRed` unit test fails #33

Closed anthonyra closed 2 years ago

anthonyra commented 2 years ago

https://github.com/cosmos/b9-checkers-academy-draft/blob/c2490f415351dfd2e6e7e6c006c34c380f7c458f/x/checkers/types/full_game_test.go#L78

In this test, we set the storedGame.Red to an AccAddress. We then use the GetRedAddress() method on that storedGame struct. Which returns the AccAddress we set the line above. However, this test is expecting that the GetRedAddress() should return nil?

I'm trying to do this with the most recent Ignite CLI (more as a challenge vs copypasta the tutorial).. is the StoredGame suppose to not allow storedGame.Red designation?

anthonyra commented 2 years ago

The address passed into the original test resulted in a nil address from AccAddressFromBech32 where I used an address that passes ... newb mistake