Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Sep 13, 2023
1 parent ecfccd2 commit 0066cea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion juniper/src/http/graphiql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
///
/// ```
/// # use juniper::http::graphiql::graphiql_source;
/// let graphiql = graphiql_source("/graphql", Some("ws://localhost:8080/subscriptions"));
/// let graphiql = graphiql_source("/graphql", Some("/subscriptions"));
/// ```
pub fn graphiql_source(
graphql_endpoint_url: &str,
Expand Down
6 changes: 2 additions & 4 deletions juniper_actix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,8 @@ mod tests {
"text/html; charset=utf-8"
);
let body = take_response_body_string(resp).await;
assert!(body.contains("<script>var GRAPHQL_URL = '/dogs-api/graphql';</script>"));
assert!(body.contains(
"<script>var GRAPHQL_SUBSCRIPTIONS_URL = '/dogs-api/subscriptions';</script>"
))
assert!(body.contains("var GRAPHQL_URL = '/dogs-api/graphql';"));
assert!(body.contains("var GRAPHQL_SUBSCRIPTIONS_URL = '/dogs-api/subscriptions';"))
}

#[actix_web::rt::test]
Expand Down
2 changes: 1 addition & 1 deletion juniper_warp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ mod tests {
);
let body = String::from_utf8(response.body().to_vec()).unwrap();

assert!(body.contains("<script>var GRAPHQL_URL = '/dogs-api/graphql';</script>"));
assert!(body.contains("var GRAPHQL_URL = '/dogs-api/graphql';"));
}

#[tokio::test]
Expand Down

0 comments on commit 0066cea

Please sign in to comment.