Skip to content

Commit 47ce85b

Browse files
committed
Use 1D variable to not depend on HashMap order in tests
1 parent ba2ef34 commit 47ce85b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/macros/tests/args.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ graphql_input_object!(
2323
#[derive(Debug)]
2424
struct Point {
2525
x: i64,
26-
y: i64,
2726
}
2827
);
2928

@@ -74,7 +73,7 @@ graphql_object!(Root: () |&self| {
7473

7574
field args_with_complex_default(
7675
arg1 = ("test".to_owned()): String as "A string default argument",
77-
arg2 = (Point { x: 1, y: 2 }): Point as "An input object default argument",
76+
arg2 = (Point { x: 1 }): Point as "An input object default argument",
7877
) -> i64 { 0 }
7978
});
8079

@@ -494,7 +493,7 @@ fn introspect_field_args_with_complex_default() {
494493
assert!(args.contains(&Value::object(vec![
495494
("name", Value::string("arg2")),
496495
("description", Value::string("An input object default argument")),
497-
("defaultValue", Value::string(r#"{y: 2, x: 1}"#)),
496+
("defaultValue", Value::string(r#"{x: 1}"#)),
498497
("type", Value::object(vec![
499498
("name", Value::string("Point")),
500499
("ofType", Value::null()),

0 commit comments

Comments
 (0)