Skip to content

Commit 588cbc5

Browse files
committed
Fix DynamoDB test failures
1 parent 93049ba commit 588cbc5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/tests/field_column_name.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,23 @@ async fn specify_custom_column_name(test: &mut DbTest) {
1717
let u = User::create().name("foo").exec(&db).await.unwrap();
1818
assert_eq!(u.name, "foo");
1919

20+
let mut filter = std::collections::HashMap::new();
21+
filter.insert("id".to_string(), toasty_core::stmt::Value::from(u.id));
22+
2023
// Make sure the column has actually been renamed to my_name in the underlying database.
2124
assert_eq!(
22-
test.get_raw_column_value::<String>("users", "my_name", Default::default())
25+
test.get_raw_column_value::<String>("users", "my_name", filter)
2326
.await
2427
.unwrap(),
2528
"foo"
2629
);
2730
}
2831

2932
async fn specify_custom_column_name_with_type(test: &mut DbTest) {
33+
if test.capability().storage_types.varchar.is_none() {
34+
return;
35+
}
36+
3037
#[derive(toasty::Model)]
3138
struct User {
3239
#[key]

0 commit comments

Comments
 (0)