diff options
author | Tobias Markmann <tm@ayena.de> | 2016-05-26 16:05:56 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2016-05-27 14:45:33 (GMT) |
commit | 4e1089eb6efc0488fd020f95cabad63db67c228c (patch) | |
tree | 9a71b3d565ca398eac1ede964ff9205088c50635 /Swiften/JID | |
parent | 402d37b3b6cc9cd4a03bc4290d204b4977dbc1d4 (diff) | |
download | swift-4e1089eb6efc0488fd020f95cabad63db67c228c.zip swift-4e1089eb6efc0488fd020f95cabad63db67c228c.tar.bz2 |
Add presence to manually added contacts in 'Start Chat…' dialog
This fixes a bug where manually added contacts, i.e. the user
entered the address and hit the 'Add to list' button, were
missing the correct presence in the contacts list in the
'Start Chat…" dialog.
Test-Information:
Tested on OS X 10.11.5 with Qt 5.4.2.
Tested adding a roster member via the drop down suggestion and
via manually entering the JID and clicking the 'Add to list'
button. In both cases the correct presence was shown.
Added a test verifying that empty JIDS are invalid.
Change-Id: Idb18e4ad2b5c0afb48461796f64e8f11f02a24fd
Diffstat (limited to 'Swiften/JID')
-rw-r--r-- | Swiften/JID/UnitTest/JIDTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/JID/UnitTest/JIDTest.cpp b/Swiften/JID/UnitTest/JIDTest.cpp index ffe28a1..432e7cb 100644 --- a/Swiften/JID/UnitTest/JIDTest.cpp +++ b/Swiften/JID/UnitTest/JIDTest.cpp @@ -15,6 +15,7 @@ class JIDTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JIDTest); CPPUNIT_TEST(testConstructorWithString); + CPPUNIT_TEST(testConstructorWithString_Empty); CPPUNIT_TEST(testConstructorWithString_NoResource); CPPUNIT_TEST(testConstructorWithString_NoNode); CPPUNIT_TEST(testConstructorWithString_EmptyResource); @@ -76,6 +77,11 @@ class JIDTest : public CppUnit::TestFixture CPPUNIT_ASSERT(testling.isValid()); } + void testConstructorWithString_Empty() { + JID testling(""); + CPPUNIT_ASSERT_EQUAL(false, testling.isValid()); + } + void testConstructorWithString_NoResource() { JID testling("foo@bar"); |