1
0
Fork 0

Update tests with new URL

https://github.com/profanity-im/profanity/issues/1085
This commit is contained in:
Michael Vetter 2019-05-03 10:46:41 +02:00
parent ebbacec667
commit a28f0d9e74
7 changed files with 40 additions and 40 deletions

View File

@ -1954,7 +1954,7 @@ stanza_attach_caps(xmpp_ctx_t *const ctx, xmpp_stanza_t *const presence)
char *sha1 = caps_get_my_sha1(ctx);
xmpp_stanza_set_attribute(caps, STANZA_ATTR_HASH, "sha-1");
xmpp_stanza_set_attribute(caps, STANZA_ATTR_NODE, "https://profanity-im.github.io");
xmpp_stanza_set_attribute(caps, STANZA_ATTR_NODE, "http://profanity-im.github.io");
xmpp_stanza_set_attribute(caps, STANZA_ATTR_VER, sha1);
xmpp_stanza_add_child(presence, caps);
xmpp_stanza_release(caps);

View File

@ -244,7 +244,7 @@ prof_connect_with_roster(char *roster)
stbbr_for_id("prof_presence_1",
"<presence id='prof_presence_1' lang='en' to='stabber@localhost/profanity' from='stabber@localhost/profanity'>"
"<priority>0</priority>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='f8mrtdyAmhnj8Ca+630bThSL718='/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io/' ver='f8mrtdyAmhnj8Ca+630bThSL718='/>"
"</presence>"
);

View File

@ -28,7 +28,7 @@ connect_jid_sends_presence_after_receiving_roster(void **state)
assert_true(stbbr_received(
"<presence id='*'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
}

View File

@ -21,7 +21,7 @@ sends_room_join(void **state)
assert_true(stbbr_last_received(
"<presence id='*' to='testroom@conference.localhost/stabber'>"
"<x xmlns='http://jabber.org/protocol/muc'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
}
@ -36,7 +36,7 @@ sends_room_join_with_nick(void **state)
assert_true(stbbr_last_received(
"<presence id='*' to='testroom@conference.localhost/testnick'>"
"<x xmlns='http://jabber.org/protocol/muc'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
}
@ -53,7 +53,7 @@ sends_room_join_with_password(void **state)
"<x xmlns='http://jabber.org/protocol/muc'>"
"<password>testpassword</password>"
"</x>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
}
@ -70,7 +70,7 @@ sends_room_join_with_nick_and_password(void **state)
"<x xmlns='http://jabber.org/protocol/muc'>"
"<password>testpassword</password>"
"</x>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
}
@ -82,7 +82,7 @@ shows_role_and_affiliation_on_join(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -102,7 +102,7 @@ shows_subject_on_join(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -130,7 +130,7 @@ shows_history_message(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -159,7 +159,7 @@ shows_occupant_join(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -188,7 +188,7 @@ shows_message(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -215,7 +215,7 @@ shows_me_message_from_occupant(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -242,7 +242,7 @@ shows_me_message_from_self(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -269,7 +269,7 @@ shows_all_messages_in_console_when_window_not_focussed(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -310,7 +310,7 @@ shows_first_message_in_console_when_window_not_focussed(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"
@ -356,7 +356,7 @@ shows_no_message_in_console_when_window_not_focussed(void **state)
stbbr_for_id("prof_join_4",
"<presence id='prof_join_4' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
"<x xmlns='http://jabber.org/protocol/muc#user'>"
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
"</x>"

View File

@ -86,7 +86,7 @@ void ping_jid(void **state)
{
stbbr_for_id("prof_caps_4",
"<iq id='prof_caps_4' to='stabber@localhost/profanity' type='result' from='buddy1@localhost/mobile'>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://www.profanity.im#LpT2xs3nun7jC2sq4gg3WRDQFZ4='>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://profanity-im.github.io#LpT2xs3nun7jC2sq4gg3WRDQFZ4='>"
"<identity category='client' type='console' name='Profanity0.6.0'/>"
"<feature var='urn:xmpp:ping'/>"
"<feature var='http://jabber.org/protocol/disco#info'/>"
@ -104,7 +104,7 @@ void ping_jid(void **state)
"<c "
"hash='sha-1' "
"xmlns='http://jabber.org/protocol/caps' "
"node='http://www.profanity.im' "
"node='http://profanity-im.github.io' "
"ver='LpT2xs3nun7jC2sq4gg3WRDQFZ4='"
"/>"
"</presence>"
@ -113,7 +113,7 @@ void ping_jid(void **state)
assert_true(stbbr_received(
"<iq id='prof_caps_4' to='buddy1@localhost/mobile' type='get'>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://www.profanity.im#LpT2xs3nun7jC2sq4gg3WRDQFZ4='/>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://profanity-im.github.io#LpT2xs3nun7jC2sq4gg3WRDQFZ4='/>"
"</iq>"
));
@ -135,7 +135,7 @@ void ping_jid_not_supported(void **state)
{
stbbr_for_id("prof_caps_4",
"<iq id='prof_caps_4' to='stabber@localhost/profanity' type='result' from='buddy1@localhost/mobile'>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://www.profanity.im#LpT2xs3nun7jC2sq4gg3WRDQFZ4='>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://profanity-im.github.io#LpT2xs3nun7jC2sq4gg3WRDQFZ4='>"
"<identity category='client' type='console' name='Profanity0.6.0'/>"
"<feature var='http://jabber.org/protocol/disco#info'/>"
"<feature var='http://jabber.org/protocol/caps'/>"
@ -152,7 +152,7 @@ void ping_jid_not_supported(void **state)
"<c "
"hash='sha-1' "
"xmlns='http://jabber.org/protocol/caps' "
"node='http://www.profanity.im' "
"node='http://profanity-im.github.io' "
"ver='LpT2xs3nun7jC2sq4gg3WRDQFZ4='"
"/>"
"</presence>"
@ -161,7 +161,7 @@ void ping_jid_not_supported(void **state)
assert_true(stbbr_received(
"<iq id='prof_caps_4' to='buddy1@localhost/mobile' type='get'>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://www.profanity.im#LpT2xs3nun7jC2sq4gg3WRDQFZ4='/>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://profanity-im.github.io#LpT2xs3nun7jC2sq4gg3WRDQFZ4='/>"
"</iq>"
));

View File

@ -20,7 +20,7 @@ presence_online(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_3'>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -37,7 +37,7 @@ presence_online_with_message(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_4'>"
"<status>Hi there</status>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -54,7 +54,7 @@ presence_away(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_4'>"
"<show>away</show>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -72,7 +72,7 @@ presence_away_with_message(void **state)
"<presence id='prof_presence_4'>"
"<show>away</show>"
"<status>I'm not here for a bit</status>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -89,7 +89,7 @@ presence_xa(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_4'>"
"<show>xa</show>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -107,7 +107,7 @@ presence_xa_with_message(void **state)
"<presence id='prof_presence_4'>"
"<show>xa</show>"
"<status>Gone to the shops</status>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -124,7 +124,7 @@ presence_dnd(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_4'>"
"<show>dnd</show>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -142,7 +142,7 @@ presence_dnd_with_message(void **state)
"<presence id='prof_presence_4'>"
"<show>dnd</show>"
"<status>Working</status>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -159,7 +159,7 @@ presence_chat(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_4'>"
"<show>chat</show>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -177,7 +177,7 @@ presence_chat_with_message(void **state)
"<presence id='prof_presence_4'>"
"<show>chat</show>"
"<status>Free to talk</status>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -194,7 +194,7 @@ presence_set_priority(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_4'>"
"<priority>25</priority>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
@ -210,7 +210,7 @@ presence_includes_priority(void **state)
assert_true(stbbr_received(
"<presence id='prof_presence_4'>"
"<priority>25</priority>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
assert_true(prof_output_exact("Priority set to 25."));
@ -221,7 +221,7 @@ presence_includes_priority(void **state)
"<priority>25</priority>"
"<show>chat</show>"
"<status>Free to talk</status>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
assert_true(prof_output_exact("Status set to chat (priority 25), \"Free to talk\"."));
@ -237,7 +237,7 @@ presence_keeps_status(void **state)
"<presence id='prof_presence_4'>"
"<show>chat</show>"
"<status>Free to talk</status>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
assert_true(prof_output_exact("Status set to chat (priority 0), \"Free to talk\"."));
@ -248,7 +248,7 @@ presence_keeps_status(void **state)
"<show>chat</show>"
"<status>Free to talk</status>"
"<priority>25</priority>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
"</presence>"
));
assert_true(prof_output_exact("Priority set to 25."));

View File

@ -36,7 +36,7 @@ send_receipt_request(void **state)
stbbr_for_id("prof_caps_4",
"<iq from='buddy1@localhost/laptop' to='stabber@localhost' id='prof_caps_4' type='result'>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://www.profanity.im#hAkb1xZdJV9BQpgGNw8zG5Xsals='>"
"<query xmlns='http://jabber.org/protocol/disco#info' node='http://profanity-im.github.io#hAkb1xZdJV9BQpgGNw8zG5Xsals='>"
"<identity category='client' name='Profanity 0.5.0' type='console'/>"
"<feature var='urn:xmpp:receipts'/>"
"</query>"
@ -47,7 +47,7 @@ send_receipt_request(void **state)
"<presence to='stabber@localhost' from='buddy1@localhost/laptop'>"
"<priority>15</priority>"
"<status>My status</status>"
"<c hash='sha-256' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='hAkb1xZdJV9BQpgGNw8zG5Xsals='/>"
"<c hash='sha-256' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='hAkb1xZdJV9BQpgGNw8zG5Xsals='/>"
"</presence>"
);