From b1b06fc503373630d49bcc9adff916ae94e2552a Mon Sep 17 00:00:00 2001
From: Christian Schneider
Date: Thu, 2 May 2024 16:58:27 +0200
Subject: Rename empty_on_fail to body_on_fail for future switching of default,
 currently also supports empty_on_fail for transition

---
 test/it_url.t | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'test')

diff --git a/test/it_url.t b/test/it_url.t
index 1898d4b..302a754 100755
--- a/test/it_url.t
+++ b/test/it_url.t
@@ -257,23 +257,23 @@ if (!ok(
 
 $output = handle_server(
 	ok(
-		it_url::get(['url' => "http://$host/not_found_with_body", 'empty_on_fail' => false, 'it_error' => false]),
+		it_url::get(['url' => "http://$host/not_found_with_body", 'body_on_fail' => true, 'it_error' => false]),
 		'it_url::get() on 404 with body'
 	)
 );
 
 $output = handle_server(
 	ok(
-		!it_url::get(['url' => "http://$host/not_found_with_body", 'empty_on_fail' => true, 'it_error' => false]),
-		'it_url::get() on 404 with body and empty_on_fail'
+		!it_url::get(['url' => "http://$host/not_found_with_body", 'body_on_fail' => false, 'it_error' => false]),
+		'it_url::get() on 404 with body and body_on_fail'
 	)
 );
 
 $output = handle_server(
 	is(
-		it::filter_keys(it_url::get(['url' => "http://$host/not_found_with_body", 'empty_on_fail' => true, 'it_error' => false, 'assoc' => true]), 'status,data'),
+		it::filter_keys(it_url::get(['url' => "http://$host/not_found_with_body", 'body_on_fail' => false, 'it_error' => false, 'assoc' => true]), 'status,data'),
 		['status' => 404, 'data' => null],
-		'it_url::get() on 404 with body, empty_on_fail and assoc'
+		'it_url::get() on 404 with body, body_on_fail and assoc'
 	)
 );
 
@@ -352,11 +352,11 @@ handle_server(
 		"success"
 	),
 	is(
-		it_url::get(['url' => "http://$host/maybe_error?chance=100", 'empty_on_fail' => false]),
+		it_url::get(['url' => "http://$host/maybe_error?chance=100", 'body_on_fail' => true]),
 		"failure"
 	),
 	is(
-		it_url::get(['url' => "http://$host/maybe_error?chance=25", 'empty_on_fail' => true, 'retries' => 10]),
+		it_url::get(['url' => "http://$host/maybe_error?chance=25", 'retries' => 10]),
 		"success",
 		"Retry on sporadically failing url in ::get"
 	),
-- 
cgit v1.2.3