(tests) Fix derive_enum test to actually test custom names
This commit is contained in:
parent
709231dc46
commit
b1a62d68e9
1 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ use juniper::{self, FromInputValue, GraphQLType, InputValue, ToInputValue};
|
||||||
enum SomeEnum {
|
enum SomeEnum {
|
||||||
Regular,
|
Regular,
|
||||||
|
|
||||||
#[graphql(name = "FULL", description = "field descr", deprecated = "depr")]
|
#[graphql(name = "full", description = "field descr", deprecated = "depr")]
|
||||||
Full,
|
Full,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@ fn test_derived_enum() {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Test FULL variant.
|
// Test FULL variant.
|
||||||
assert_eq!(SomeEnum::Full.to_input_value(), InputValue::String("FULL".into()));
|
assert_eq!(SomeEnum::Full.to_input_value(), InputValue::String("full".into()));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
FromInputValue::from_input_value(&InputValue::String("FULL".into())),
|
FromInputValue::from_input_value(&InputValue::String("full".into())),
|
||||||
Some(SomeEnum::Full)
|
Some(SomeEnum::Full)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue