socialpredict
socialpredict copied to clipboard
move bet validation to Bet data type
This PR is not ready. It:
- adds a
Bets
type to enable operating on multiple Bets at once - moves
ValidateBuy
to models/bets - updates function signature for
ValdiateBuy
to be a method on theBet
type, and to remove theBet
parameter from the signature
TODO:
- add test case for valid Bets
- add remaining test cases for invalid Bets
- add ability to use a test double in place of gorm db