Move and enable public api integration tests (#692)

This commit is contained in:
Christian Legnitto 2020-07-08 16:40:34 -10:00 committed by GitHub
parent de3a79a142
commit 61cb75969e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View 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"));
}

View file

@ -1,4 +1,6 @@
#[cfg(test)]
mod api;
#[cfg(test)]
mod codegen;
#[cfg(test)]
mod custom_scalar;

View file

@ -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"));
}