@@ -2,10 +2,10 @@ use shopify_function::prelude::*;
2
2
use shopify_function:: Result ;
3
3
4
4
#[ shopify_function_target( query_path = "src/run.graphql" , schema_path = "schema.graphql" ) ]
5
- fn run ( input : input:: ResponseData ) -> Result < output:: FunctionRunResult > {
5
+ fn run ( _input : input:: ResponseData ) -> Result < output:: FunctionRunResult > {
6
6
let no_discounts = output:: FunctionRunResult {
7
- line_discounts : Some ( vec ! [ ] ) ,
8
- displayable_errors : Some ( vec ! [ ] ) ,
7
+ line_discounts : Some ( vec ! [ ] ) ,
8
+ displayable_errors : Some ( vec ! [ ] ) ,
9
9
} ;
10
10
11
11
Ok ( no_discounts)
@@ -15,10 +15,11 @@ fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
15
15
mod tests {
16
16
use super :: * ;
17
17
use shopify_function:: run_function_with_input;
18
- use run:: output;
19
18
20
19
#[ test]
21
20
fn test_result_with_no_discounts ( ) -> Result < ( ) > {
21
+ use run:: output;
22
+
22
23
let result = run_function_with_input (
23
24
run,
24
25
r#"
@@ -30,12 +31,11 @@ mod tests {
30
31
"# ,
31
32
) ?;
32
33
let expected = output:: FunctionRunResult {
33
- line_discounts : Some ( vec ! [ ] ) ,
34
- displayable_errors : Some ( vec ! [ ] ) ,
34
+ line_discounts : Some ( vec ! [ ] ) ,
35
+ displayable_errors : Some ( vec ! [ ] ) ,
35
36
} ;
36
37
37
38
assert_eq ! ( result, expected) ;
38
39
Ok ( ( ) )
39
40
}
40
-
41
41
}
0 commit comments