diff options
Diffstat (limited to 'Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp')
-rw-r--r-- | Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp index 52537a9..20c959c 100644 --- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp +++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp @@ -154,2 +154,3 @@ class ChatsManagerTest : public CppUnit::TestFixture { CPPUNIT_TEST(testImpromptuChatTitle); + CPPUNIT_TEST(testImpromptuChatWindowTitle); @@ -1513,3 +1514,3 @@ public: - void testImpromptuChatTitle() { + void impromptuChatSetup(MockChatWindow* window) { stanzaChannel_->uniqueIDs_ = true; @@ -1518,4 +1519,2 @@ public: - // Open chat window to a sender. - MockChatWindow* window = new MockChatWindow(); std::shared_ptr<IQ> infoRequest = std::dynamic_pointer_cast<IQ>(stanzaChannel_->sentStanzas[1]); @@ -1571,3 +1570,8 @@ public: } + } + void testImpromptuChatTitle() { + // Open a new chat window to a sender. + MockChatWindow* window = new MockChatWindow(); + impromptuChatSetup(window); // After people joined, the title is the list of participant nicknames or names coming from Roster (if nicknames are unavailable) @@ -1576,2 +1580,9 @@ public: + void testImpromptuChatWindowTitle() { + // Open a new chat window to a sender. + MockChatWindow* window = new MockChatWindow(); + impromptuChatSetup(window); + // After people joined, the title of chat window is combined of participant nicknames or names coming from Roster (if nicknames are unavailable) + CPPUNIT_ASSERT_EQUAL(std::string("bar@test.com, foo@test.com"), window->name_); + } |