Use greater than in having test

This commit is contained in:
Sam Samai 2021-07-18 20:58:52 +10:00
parent a41d980848
commit c4667296ca

View File

@ -355,7 +355,7 @@ pub async fn test_group_by() {
} }
pub async fn test_having() { pub async fn test_having() {
// customers with orders with total equal to $100 // customers with orders with total equal to $90
let ctx = TestContext::new("mysql://root:@localhost", "test_having").await; let ctx = TestContext::new("mysql://root:@localhost", "test_having").await;
let bakery = bakery::ActiveModel { let bakery = bakery::ActiveModel {
@ -444,7 +444,7 @@ pub async fn test_having() {
.column_as(order::Column::Total, "order_total") .column_as(order::Column::Total, "order_total")
.group_by(customer::Column::Name) .group_by(customer::Column::Name)
.group_by(order::Column::Total) .group_by(order::Column::Total)
.having(order::Column::Total.eq(dec!(100.00))) .having(order::Column::Total.gt(dec!(90.00)))
.into_model::<SelectResult>() .into_model::<SelectResult>()
.all(&ctx.db) .all(&ctx.db)
.await .await