remove test case

This commit is contained in:
Federico Kunze 2020-05-15 12:43:52 -04:00
parent 9932169a67
commit 6a07def455
No known key found for this signature in database
GPG Key ID: 655F93A970080A30
2 changed files with 1 additions and 35 deletions

View File

@ -88,12 +88,6 @@ func (a BaseAuction) Validate() error {
if a.EndTime.After(a.MaxEndTime) { if a.EndTime.After(a.MaxEndTime) {
return fmt.Errorf("MaxEndTime < EndTime (%s < %s)", a.MaxEndTime, a.EndTime) return fmt.Errorf("MaxEndTime < EndTime (%s < %s)", a.MaxEndTime, a.EndTime)
} }
if a.HasReceivedBids && !a.Bid.IsPositive() {
return fmt.Errorf("cannot have a zero value bid when auction has a true HasReceivedBids flag value")
}
if !a.HasReceivedBids && a.Bid.IsPositive() {
return fmt.Errorf("cannot have a positive value bid when auction has a false HasReceivedBids flag value")
}
return nil return nil
} }
@ -193,7 +187,7 @@ func NewDebtAuction(buyerModAccName string, bid sdk.Coin, initialLot sdk.Coin, e
Lot: initialLot, Lot: initialLot,
Bidder: supply.NewModuleAddress(buyerModAccName), // send proceeds from the first bid to the buyer. Bidder: supply.NewModuleAddress(buyerModAccName), // send proceeds from the first bid to the buyer.
Bid: bid, // amount that the buyer is buying - doesn't change over course of auction Bid: bid, // amount that the buyer is buying - doesn't change over course of auction
HasReceivedBids: true, // new auctions don't have any bids HasReceivedBids: true,
EndTime: endTime, EndTime: endTime,
MaxEndTime: endTime, MaxEndTime: endTime,
}, },

View File

@ -196,34 +196,6 @@ func TestBaseAuctionValidate(t *testing.T) {
}, },
false, false,
}, },
{
"zero bid with received bids",
BaseAuction{
ID: 1,
Initiator: testAccAddress1,
Lot: c("kava", 1),
Bidder: addr1,
Bid: c("kava", 0),
EndTime: now,
MaxEndTime: now,
HasReceivedBids: true,
},
false,
},
{
"positive bid without receiving bids",
BaseAuction{
ID: 1,
Initiator: testAccAddress1,
Lot: c("kava", 1),
Bidder: addr1,
Bid: c("kava", 1),
EndTime: now,
MaxEndTime: now,
HasReceivedBids: false,
},
false,
},
} }
for _, tc := range tests { for _, tc := range tests {