(active_model: A)
| 1122 | } |
| 1123 | |
| 1124 | fn assert_it<E, A>(active_model: A) |
| 1125 | where |
| 1126 | E: EntityTrait, |
| 1127 | A: ActiveModelTrait<Entity = E>, |
| 1128 | { |
| 1129 | assert_eq!( |
| 1130 | E::find().build(DbBackend::Postgres).to_string(), |
| 1131 | r#"SELECT "hello"."id", "hello"."one1", CAST("hello"."two" AS integer), "hello"."three3" FROM "hello""#, |
| 1132 | ); |
| 1133 | assert_eq!( |
| 1134 | Update::one(active_model) |
| 1135 | .build(DbBackend::Postgres) |
| 1136 | .to_string(), |
| 1137 | r#"UPDATE "hello" SET "one1" = 1, "two" = 2, "three3" = 3 WHERE "hello"."id" = 1"#, |
| 1138 | ); |
| 1139 | } |
| 1140 | |
| 1141 | assert_it(hello_expanded::ActiveModel { |
| 1142 | id: ActiveValue::set(1), |
no outgoing calls
no test coverage detected