Skip to content

Commit

Permalink
Fix mongodb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreilles committed Oct 7, 2024
1 parent 8b15e06 commit 277dee0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mod mongodb {
geom
}
}"#),
@r###"{"data":{"createOneTestModel":{"int":2147483647,"long":32767,"bInt":"9223372036854775807","float":3.1234,"oid":"61e1425609c85b5e01817cc5","str":"test","bool":true,"bin":"dGVzdA==","bin_oid":"YeUuxAwj5igGOSD0","geom":"{\"type\":\"Point\",\"coordinates\":[0,0]}"}}}"###
@r###"{"data":{"createOneTestModel":{"int":2147483647,"long":32767,"bInt":"9223372036854775807","float":3.1234,"oid":"61e1425609c85b5e01817cc5","str":"test","bool":true,"bin":"dGVzdA==","bin_oid":"YeUuxAwj5igGOSD0","geom":"{\"type\":\"Point\",\"coordinates\":[0.0,0.0]}"}}}"###
);

Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,9 @@ mod geometry_create {
&runner,
r#"mutation { createOneTestModel(data: { id: 1, geometry: "{\"type\":\"Point\",\"coordinates\":[1,2]}" }) { geometry }}"#,
// MongoDB excludes undefined fields
MySql(Some(MySqlVersion::V8) | None) | Vitess(_) => vec![r#"{"data":{"createOneTestModel":{"geometry":"{\"coordinates\":[1.0,2.0],\"type\":\"Point\"}"}}}"#],
MySql(Some(MySqlVersion::V5_7)) => vec![r#"{"data":{"createOneTestModel":{"geometry":"{\"coordinates\":[1,2],\"type\":\"Point\"}"}}}"#],
Vitess(_) | MySql(Some(MySqlVersion::V8) | None) => vec![r#"{"data":{"createOneTestModel":{"geometry":"{\"coordinates\":[1.0,2.0],\"type\":\"Point\"}"}}}"#],
MongoDb(_) => vec![r#"{"data":{"createOneTestModel":{"geometry":"{\"type\":\"Point\",\"coordinates\":[1,2]}"}}}"#],
_ => vec![r#"{"data":{"createOneTestModel":{"geometry":"{\"type\":\"Point\",\"coordinates\":[1,2]}"}}}"#]
);

Expand Down

0 comments on commit 277dee0

Please sign in to comment.