Skip to content

Commit dcb42ab

Browse files
committed
Added product check unit test
1 parent 211939e commit dcb42ab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

t/60_Cxn/20_process_response.t

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,18 @@ throws_ok {
108108
}
109109
qr/Timeout/, "Timeout error";
110110

111+
### Product check without x-elastic-product header throws error
112+
throws_ok {
113+
$c->process_response( { method => 'GET', ignore => [] },
114+
200, "OK" );
115+
}
116+
qr/ProductCheck/, "ProductCheck error";
117+
118+
### Product check with x-elastic-product is OK
119+
( $code, $response )
120+
= $c->process_response( { method => 'GET', ignore => [] },
121+
200, "OK", '', { $PRODUCT_CHECK_HEADER => $PRODUCT_CHECK_VALUE } );
122+
123+
is $code, 200, "OK Product check is present";
124+
111125
done_testing;

0 commit comments

Comments
 (0)