rustfmt
This commit is contained in:
parent
ffedb9556b
commit
c41f87c645
|
@ -47,7 +47,6 @@ enum UnreferencedInterface {
|
|||
ObjectC(ObjectC),
|
||||
}
|
||||
|
||||
|
||||
#[derive(Union)]
|
||||
enum ObjectUnion {
|
||||
ObjectA(ObjectA),
|
||||
|
@ -62,14 +61,16 @@ impl Query {
|
|||
ObjectA {
|
||||
id: 33,
|
||||
title: "haha".to_string(),
|
||||
}.into()
|
||||
}
|
||||
.into()
|
||||
}
|
||||
|
||||
async fn explicit(&self) -> ExplicitInterface {
|
||||
ObjectA {
|
||||
id: 40,
|
||||
title: "explicit".to_string(),
|
||||
}.into()
|
||||
}
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,13 +112,25 @@ pub async fn test_interface_exports_interfaces_on_object_type() {
|
|||
.unwrap()
|
||||
.data,
|
||||
)
|
||||
.unwrap();
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(resp.ty.name, "ObjectA");
|
||||
assert_eq!(resp.ty.kind, "OBJECT");
|
||||
assert!(resp.ty.interfaces.iter().any(|i| i.name == "ExplicitInterface"));
|
||||
assert!(resp.ty.interfaces.iter().any(|i| i.name == "ImplicitInterface"));
|
||||
assert!(!resp.ty.interfaces.iter().any(|i| i.name == "InvisibleInterface"));
|
||||
assert!(resp
|
||||
.ty
|
||||
.interfaces
|
||||
.iter()
|
||||
.any(|i| i.name == "ExplicitInterface"));
|
||||
assert!(resp
|
||||
.ty
|
||||
.interfaces
|
||||
.iter()
|
||||
.any(|i| i.name == "ImplicitInterface"));
|
||||
assert!(!resp
|
||||
.ty
|
||||
.interfaces
|
||||
.iter()
|
||||
.any(|i| i.name == "InvisibleInterface"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
Loading…
Reference in New Issue