diff options
author | Tarun Gupta <tarun1995gupta@gmail.com> | 2017-06-23 17:52:45 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-07-07 11:20:06 (GMT) |
commit | 2a251161c5baa688ec12068346359bd829ab2ea1 (patch) | |
tree | 2bb4797ed266305d08a2800fbf728e8149026b84 /Swiften/Parser/PayloadParsers/UnitTest | |
parent | 610a2169757b578c6246c0d277f95a79695652ba (diff) | |
download | swift-2a251161c5baa688ec12068346359bd829ab2ea1.zip swift-2a251161c5baa688ec12068346359bd829ab2ea1.tar.bz2 |
Update namespace for MIX Elements
Namespace update from urn:xmpp:mix:1 to urn:xmpp:mix:0 for MIX
elements for checking against server implementation
License:
This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Change-Id: I1bbd06d83f54fcde81ae0ed06dda90aec0ef1aeb
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest')
7 files changed, 18 insertions, 21 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MIXCreateParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MIXCreateParserTest.cpp index 85c79c6..f48bbc7 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/MIXCreateParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/MIXCreateParserTest.cpp @@ -14,7 +14,7 @@ using namespace Swift; TEST(MIXCreateParserTest, XEP0369_Example68) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<create xmlns=\"urn:xmpp:mix:1\"/>" + "<create xmlns=\"urn:xmpp:mix:0\"/>" )); auto payload = parser.getPayload<MIXCreate>(); @@ -27,7 +27,7 @@ TEST(MIXCreateParserTest, XEP0369_Example68) { TEST(MIXCreateParserTest, XEP0369_Example66) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:1\"/>" + "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>" )); auto payload = parser.getPayload<MIXCreate>(); @@ -42,10 +42,10 @@ TEST(MIXCreateParserTest, XEP0369_Example66) { TEST(MIXCreateParserTest, XEP0369_Example67) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:1\">" + "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:0\">" "<x xmlns=\"jabber:x:data\" type=\"result\">" "<field var=\"FORM_TYPE\" type=\"hidden\">" - "<value>urn:xmpp:mix:1</value>" + "<value>urn:xmpp:mix:0</value>" "</field>" "<field var=\"Owner\">" "<value>hecate@shakespeare.lit</value>" diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParser.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParser.cpp index fc2588a..80eb144 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParser.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParser.cpp @@ -14,7 +14,7 @@ using namespace Swift; TEST(MIXDestroyParserTest, XEP0369_Example70) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:1\"/>" + "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>" )); auto payload = parser.getPayload<MIXDestroy>(); diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParserTest.cpp index 8e4dff2..5fa321e 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/MIXDestroyParserTest.cpp @@ -14,7 +14,7 @@ using namespace Swift; TEST(MIXDestroyParserTest, XEP0369_Example70) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:1\"/>" + "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>" )); auto payload = parser.getPayload<MIXDestroy>(); diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MIXJoinParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MIXJoinParserTest.cpp index 7a422f4..88d8fc1 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/MIXJoinParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/MIXJoinParserTest.cpp @@ -14,7 +14,7 @@ using namespace Swift; TEST(MIXJoinParserTest, XEP0369_Example22) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<join xmlns=\"urn:xmpp:mix:1\" channel=\"coven@mix.shakespeare.example\">" + "<join xmlns=\"urn:xmpp:mix:0\" channel=\"coven@mix.shakespeare.example\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>" @@ -41,7 +41,7 @@ TEST(MIXJoinParserTest, XEP0369_Example22) { TEST(MIXJoinParserTest, XEP0369_Example23) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<join xmlns=\"urn:xmpp:mix:1\">" + "<join xmlns=\"urn:xmpp:mix:0\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>" @@ -67,7 +67,7 @@ TEST(MIXJoinParserTest, XEP0369_Example23) { TEST(MIXJoinParserTest, XEP0369_Example24) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<join xmlns=\"urn:xmpp:mix:1\" jid=\"123456#coven@mix.shakespeare.example\">" + "<join xmlns=\"urn:xmpp:mix:0\" jid=\"123456#coven@mix.shakespeare.example\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>" @@ -94,12 +94,12 @@ TEST(MIXJoinParserTest, XEP0369_Example24) { TEST(MIXJoinParserTest, XEP0369_Example29) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<join xmlns=\"urn:xmpp:mix:1\">" + "<join xmlns=\"urn:xmpp:mix:0\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<x xmlns=\"jabber:x:data\" type=\"submit\">" "<field var=\"FORM_TYPE\" type=\"hidden\">" - "<value>urn:xmpp:mix:1</value>" + "<value>urn:xmpp:mix:0</value>" "</field>" "<field var=\"JID Visibility\">" "<value>never</value>" @@ -130,12 +130,12 @@ TEST(MIXJoinParserTest, XEP0369_Example29) { TEST(MIXJoinParserTest, XEP0369_Example30) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<join xmlns=\"urn:xmpp:mix:1\" jid=\"hag66@shakespeare.example\">" + "<join xmlns=\"urn:xmpp:mix:0\" jid=\"hag66@shakespeare.example\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<x xmlns=\"jabber:x:data\" type=\"result\">" "<field var=\"FORM_TYPE\" type=\"hidden\">" - "<value>urn:xmpp:mix:1</value>" + "<value>urn:xmpp:mix:0</value>" "</field>" "<field var=\"JID Visibility\">" "<value>never</value>" diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MIXLeaveParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MIXLeaveParserTest.cpp index dab3ea4..0a2839e 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/MIXLeaveParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/MIXLeaveParserTest.cpp @@ -13,7 +13,7 @@ using namespace Swift; TEST(MIXLeaveParserTest, XEP0369_Example33) { PayloadsParserTester parser; - ASSERT_TRUE(parser.parse("<leave xmlns=\"urn:xmpp:mix:1\" channel=\"coven@mix.shakespeare.example\"/>")); + ASSERT_TRUE(parser.parse("<leave xmlns=\"urn:xmpp:mix:0\" channel=\"coven@mix.shakespeare.example\"/>")); auto payload = parser.getPayload<MIXLeave>(); ASSERT_TRUE(payload); @@ -24,7 +24,7 @@ TEST(MIXLeaveParserTest, XEP0369_Example33) { TEST(MIXLeaveParserTest, XEP0369_Example34) { PayloadsParserTester parser; - ASSERT_TRUE(parser.parse("<leave xmlns=\"urn:xmpp:mix:1\"/>")); + ASSERT_TRUE(parser.parse("<leave xmlns=\"urn:xmpp:mix:0\"/>")); auto payload = parser.getPayload<MIXLeave>(); ASSERT_TRUE(payload); diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MIXParticipantParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MIXParticipantParserTest.cpp index 27c02e7..57d4b35 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/MIXParticipantParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/MIXParticipantParserTest.cpp @@ -54,6 +54,3 @@ TEST(MIXParticipantParserTest, XEP0369_Example27_ParticipantEmpty) { ASSERT_FALSE(payload->getNick()); ASSERT_FALSE(payload->getJID()); } - - - diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MIXUserPreferenceParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MIXUserPreferenceParserTest.cpp index 3d048a5..7115f2a 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/MIXUserPreferenceParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/MIXUserPreferenceParserTest.cpp @@ -14,7 +14,7 @@ using namespace Swift; TEST(MIXUserPreferenceParserTest, XEP0369_Example31) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<user-preference xmlns='urn:xmpp:mix:1'/>" + "<user-preference xmlns='urn:xmpp:mix:0'/>" )); auto payload = parser.getPayload<MIXUserPreference>(); @@ -26,10 +26,10 @@ TEST(MIXUserPreferenceParserTest, XEP0369_Example31) { TEST(MIXUserPreferenceParserTest, XEP0369_Example32) { PayloadsParserTester parser; ASSERT_TRUE(parser.parse( - "<user-preference xmlns='urn:xmpp:mix:1'>" + "<user-preference xmlns='urn:xmpp:mix:0'>" "<x xmlns='jabber:x:data' type='result'>" "<field var='FORM_TYPE' type='hidden'>" - "<value>urn:xmpp:mix:1</value>" + "<value>urn:xmpp:mix:0</value>" "</field>" "<field var='JID Visibility'>" "<value>never</value>" |