File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ mod tests {
25
25
} ;
26
26
let subgraph_client = subgraph_args. to_subgraph_client ( ) . unwrap ( ) ;
27
27
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) ;
28
35
}
29
36
30
37
#[ test]
@@ -42,6 +49,7 @@ mod tests {
42
49
let url = "" . to_string ( ) ;
43
50
let subgraph_args = SubgraphArgs { url } ;
44
51
let err = subgraph_args. to_subgraph_client ( ) . unwrap_err ( ) ;
52
+ // Empty URL results in RelativeUrlWithoutBase error
45
53
assert_eq ! ( err, ParseError :: RelativeUrlWithoutBase ) ;
46
54
47
55
let url = ":" . to_string ( ) ;
You can’t perform that action at this time.
0 commit comments