Conversation
|
|
||
| bidOneID = rand.Int() | ||
| bidTwoID = rand.Int() | ||
| flipIlkMetadata := types.GetValueMetadata(storage.Ilk, nil, types.Bytes32) |
There was a problem hiding this comment.
Any reason not to use flip.IlkMetadata here?
| ethBidUsrErr := repo.Create(diffID, headerOneID, flipBidUsrMetadata, usrOne) | ||
| Expect(ethBidUsrErr).NotTo(HaveOccurred()) | ||
|
|
||
| flipBidUsrMetadata.Keys[constants.BidId] = strconv.Itoa(bidTwoID) |
There was a problem hiding this comment.
nbd but I'd be tempted to create a new metadata object for bidTwoID so that there's less risk of these tests failing if the order of operations are modified (e.g. if this assignment happened before the insert on line 49)
| Expect(err).NotTo(HaveOccurred()) | ||
|
|
||
| Expect(actualEvents).To(ConsistOf(expectedFlip)) | ||
| }) |
There was a problem hiding this comment.
Reluctant to suggest this because these tests already require some weighty setup, but I think it'd be good to add a row for a different ilk and verify that we're correctly filtering on that field
There was a problem hiding this comment.
One other test that might provide helpful documentation could mention that it provides results from multiple auctions for an urn (if that urn has been flipped several times)
elizabethengelman
left a comment
There was a problem hiding this comment.
I like @rmulhol suggestions about the query test additions, but other than that this LGTM! ![]()
47d9282 to
ed2c431
Compare
ed2c431 to
450e13e
Compare
No description provided.