Move and enable public api integration tests (#692)
This commit is contained in:
parent
de3a79a142
commit
61cb75969e
3 changed files with 14 additions and 10 deletions
12
integration_tests/juniper_tests/src/api.rs
Normal file
12
integration_tests/juniper_tests/src/api.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#[test]
|
||||
fn operation_name_is_public() {
|
||||
use juniper::{http::GraphQLRequest, DefaultScalarValue};
|
||||
|
||||
let request = GraphQLRequest::<DefaultScalarValue>::new(
|
||||
"query".to_string(),
|
||||
Some("name".to_string()),
|
||||
None,
|
||||
);
|
||||
|
||||
assert_eq!(request.operation_name(), Some("name"));
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
#[cfg(test)]
|
||||
mod api;
|
||||
#[cfg(test)]
|
||||
mod codegen;
|
||||
#[cfg(test)]
|
||||
mod custom_scalar;
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
extern crate juniper;
|
||||
|
||||
#[test]
|
||||
fn pub_operation_name() {
|
||||
use juniper::http::GraphQLRequest;
|
||||
|
||||
let request = GraphQLRequest::new("query".to_string(), Some("name".to_string()), None);
|
||||
|
||||
assert_eq!(request.operation_name(), Some("name"));
|
||||
}
|
Loading…
Reference in a new issue