From a978bb12bf0235be9e57e0e08b6328acc88add8b Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 18 Aug 2016 22:51:06 +0100 Subject: Send receipt request only when receiver supports feature issue #829 --- tests/functionaltests/test_receipts.c | 39 ++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'tests/functionaltests/test_receipts.c') diff --git a/tests/functionaltests/test_receipts.c b/tests/functionaltests/test_receipts.c index 6a347f7e..59333a87 100644 --- a/tests/functionaltests/test_receipts.c +++ b/tests/functionaltests/test_receipts.c @@ -12,7 +12,7 @@ #include "proftest.h" void -send_receipt_request(void **state) +does_not_send_receipt_request_to_barejid(void **state) { prof_input("/receipts request on"); @@ -23,6 +23,43 @@ send_receipt_request(void **state) assert_true(stbbr_received( "" "Hi there" + "" + )); +} + +void +send_receipt_request(void **state) +{ + prof_input("/receipts request on"); + + prof_connect(); + + stbbr_for_id("prof_caps_4", + "" + "" + "" + "" + "" + "" + ); + + stbbr_send( + "" + "15" + "My status" + "" + "" + ); + + prof_output_exact("Buddy1 is online, \"My status\""); + + prof_input("/msg Buddy1"); + prof_input("/resource set laptop"); + prof_input("Hi there, where is my receipt?"); + + assert_true(stbbr_received( + "" + "Hi there, where is my receipt?" "" "" )); -- cgit 1.4.1-2-gfad0