Uncomment tests that now work (#797)
* Uncomment tests that now work * Fix formatting
This commit is contained in:
parent
cd66bdb450
commit
f6ec735ba9
1 changed files with 73 additions and 77 deletions
|
@ -74,17 +74,17 @@ impl Root {
|
||||||
arg1 + arg2
|
arg1 + arg2
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: enable once [parameter attributes are supported by proc macros]
|
fn attr_arg_descr(#[graphql(description = "The arg")] arg: i32) -> i32 {
|
||||||
// (https://github.com/graphql-rust/juniper/pull/441)
|
0
|
||||||
//fn attr_arg_descr(
|
}
|
||||||
// #[graphql(description = "The arg")]
|
|
||||||
// arg: i32) -> i32
|
fn attr_arg_descr_collapse(
|
||||||
//{ 0 }
|
#[graphql(description = "The first arg")]
|
||||||
//fn attr_arg_descr_collapse(
|
#[graphql(description = "and more details")]
|
||||||
// #[graphql(description = "The first arg")]
|
arg: i32,
|
||||||
// #[graphql(description = "and more details")]
|
) -> i32 {
|
||||||
// arg: i32,
|
0
|
||||||
//) -> i32 { 0 }
|
}
|
||||||
|
|
||||||
#[graphql(arguments(arg(default = 123,),))]
|
#[graphql(arguments(arg(default = 123,),))]
|
||||||
fn arg_with_default(arg: i32) -> i32 {
|
fn arg_with_default(arg: i32) -> i32 {
|
||||||
|
@ -580,75 +580,71 @@ async fn introspect_field_multi_args_descr_trailing_comma() {
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: enable once [parameter attributes are supported by proc macros]
|
#[tokio::test]
|
||||||
// (https://github.com/graphql-rust/juniper/pull/441)
|
async fn introspect_field_attr_arg_descr() {
|
||||||
// #[tokio::test]
|
run_args_info_query("attrArgDescr", |args| {
|
||||||
// fn introspect_field_attr_arg_descr() {
|
assert_eq!(args.len(), 1);
|
||||||
// run_args_info_query("attrArgDescr", |args| {
|
|
||||||
// assert_eq!(args.len(), 1);
|
|
||||||
|
|
||||||
// assert!(args.contains(&Value::object(
|
assert!(args.contains(&Value::object(
|
||||||
// vec![
|
vec![
|
||||||
// ("name", Value::scalar("arg")),
|
("name", Value::scalar("arg")),
|
||||||
// ("description", Value::scalar("The arg")),
|
("description", Value::scalar("The arg")),
|
||||||
// ("defaultValue", Value::null()),
|
("defaultValue", Value::null()),
|
||||||
// (
|
(
|
||||||
// "type",
|
"type",
|
||||||
// Value::object(
|
Value::object(
|
||||||
// vec![
|
vec![
|
||||||
// ("name", Value::null()),
|
("name", Value::null()),
|
||||||
// (
|
(
|
||||||
// "ofType",
|
"ofType",
|
||||||
// Value::object(
|
Value::object(
|
||||||
// vec![("name", Value::scalar("Int"))].into_iter().collect(),
|
vec![("name", Value::scalar("Int"))].into_iter().collect(),
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// ]
|
]
|
||||||
// .into_iter()
|
.into_iter()
|
||||||
// .collect(),
|
.collect(),
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// ]
|
]
|
||||||
// .into_iter()
|
.into_iter()
|
||||||
// .collect(),
|
.collect(),
|
||||||
// )));
|
)));
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
// TODO: enable once [parameter attributes are supported by proc macros]
|
#[tokio::test]
|
||||||
// (https://github.com/graphql-rust/juniper/pull/441)
|
async fn introspect_field_attr_arg_descr_collapse() {
|
||||||
// #[tokio::test]
|
run_args_info_query("attrArgDescrCollapse", |args| {
|
||||||
// fn introspect_field_attr_arg_descr_collapse() {
|
assert_eq!(args.len(), 1);
|
||||||
// run_args_info_query("attrArgDescrCollapse", |args| {
|
|
||||||
// assert_eq!(args.len(), 1);
|
|
||||||
|
|
||||||
// assert!(args.contains(&Value::object(
|
assert!(args.contains(&Value::object(
|
||||||
// vec![
|
vec![
|
||||||
// ("name", Value::scalar("arg")),
|
("name", Value::scalar("arg")),
|
||||||
// ("description", Value::scalar("The arg\nand more details")),
|
("description", Value::scalar("The arg\nand more details")),
|
||||||
// ("defaultValue", Value::null()),
|
("defaultValue", Value::null()),
|
||||||
// (
|
(
|
||||||
// "type",
|
"type",
|
||||||
// Value::object(
|
Value::object(
|
||||||
// vec![
|
vec![
|
||||||
// ("name", Value::null()),
|
("name", Value::null()),
|
||||||
// (
|
(
|
||||||
// "ofType",
|
"ofType",
|
||||||
// Value::object(
|
Value::object(
|
||||||
// vec![("name", Value::scalar("Int"))].into_iter().collect(),
|
vec![("name", Value::scalar("Int"))].into_iter().collect(),
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// ]
|
]
|
||||||
// .into_iter()
|
.into_iter()
|
||||||
// .collect(),
|
.collect(),
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// ]
|
]
|
||||||
// .into_iter()
|
.into_iter()
|
||||||
// .collect(),
|
.collect(),
|
||||||
// )));
|
)));
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn introspect_field_arg_with_default() {
|
async fn introspect_field_arg_with_default() {
|
||||||
|
|
Loading…
Reference in a new issue