Skip to content

Commit 2870984

Browse files
committed
add suggested changes
1 parent f00088c commit 2870984

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/common/src/subgraph.rs

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ mod tests {
2525
};
2626
let subgraph_client = subgraph_args.to_subgraph_client().unwrap();
2727
assert_eq!(subgraph_client.url().as_str(), url);
28+
29+
let url = "https://api.thegraph.com/subgraphs/name/org1/sg1?version=latest&format=json";
30+
let subgraph_args = SubgraphArgs {
31+
url: url.to_string(),
32+
};
33+
let subgraph_client = subgraph_args.to_subgraph_client().unwrap();
34+
assert_eq!(subgraph_client.url().as_str(), url);
2835
}
2936

3037
#[test]
@@ -42,6 +49,7 @@ mod tests {
4249
let url = "".to_string();
4350
let subgraph_args = SubgraphArgs { url };
4451
let err = subgraph_args.to_subgraph_client().unwrap_err();
52+
// Empty URL results in RelativeUrlWithoutBase error
4553
assert_eq!(err, ParseError::RelativeUrlWithoutBase);
4654

4755
let url = ":".to_string();

0 commit comments

Comments
 (0)