summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-01-19 14:17:28 (GMT)
committerTobias Markmann <tm@ayena.de>2016-01-19 14:17:28 (GMT)
commit0ca3ea9a88acb5e2d42baa3a85d61495d72b7352 (patch)
treefad2683919bad1eaae2b964f0aadf0e4a1ed440d /Swift/Controllers/UnitTest
parent3cca16eb9c7035af82209cf2db4c5efafd90f584 (diff)
downloadswift-0ca3ea9a88acb5e2d42baa3a85d61495d72b7352.zip
swift-0ca3ea9a88acb5e2d42baa3a85d61495d72b7352.tar.bz2
Reset impromptu support flag when logging off
Test-Information: Added unit test verifying the expected behavior. It passes on OS X 10.11.2. Change-Id: I7531e313bf03dbea276f133db042ce26e6da4a53
Diffstat (limited to 'Swift/Controllers/UnitTest')
-rw-r--r--Swift/Controllers/UnitTest/MockChatWindow.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h
index ddb7e3e..4523d29 100644
--- a/Swift/Controllers/UnitTest/MockChatWindow.h
+++ b/Swift/Controllers/UnitTest/MockChatWindow.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -15,7 +15,7 @@
namespace Swift {
class MockChatWindow : public ChatWindow {
public:
- MockChatWindow() : labelsEnabled_(false) {}
+ MockChatWindow() : labelsEnabled_(false), impromptuMUCSupported_(false) {}
virtual ~MockChatWindow();
virtual std::string addMessage(const ChatMessage& message, const std::string& /*senderName*/, bool /*senderIsSelf*/, boost::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {
@@ -82,7 +82,10 @@ namespace Swift {
virtual void setAvailableRoomActions(const std::vector<RoomAction> &) {}
virtual void setBlockingState(BlockingState) {}
- virtual void setCanInitiateImpromptuChats(bool /*supportsImpromptu*/) {}
+ virtual void setCanInitiateImpromptuChats(bool supportsImpromptu) {
+ impromptuMUCSupported_ = supportsImpromptu;
+ }
+
virtual void showBookmarkWindow(const MUCBookmark& /*bookmark*/) {}
virtual void setBookmarkState(RoomBookmarkState) {}
@@ -102,6 +105,7 @@ namespace Swift {
ChatMessage lastReplacedMessage_;
std::vector<SecurityLabelsCatalog::Item> labels_;
bool labelsEnabled_;
+ bool impromptuMUCSupported_;
SecurityLabelsCatalog::Item label_;
Roster* roster_;
};