summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-12-26 22:52:16 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-12-26 22:52:16 (GMT)
commitc3bda61b09597a7944fbc382366bcdf998540e82 (patch)
treea710af80c7e494a60a2676d3595ba4ab3a5ccf79 /Swift/Controllers/UnitTest/MockChatWindow.h
parent21532c3557a3dc43f5f0376bf6554f6895c71a03 (diff)
downloadswift-c3bda61b09597a7944fbc382366bcdf998540e82.zip
swift-c3bda61b09597a7944fbc382366bcdf998540e82.tar.bz2
More thoroughly test the chat routing.
This adds in the behaviour for unbinding chats when the resource goes offline (only if there isn't already an unbound chatwindow). Resolves: #155
Diffstat (limited to 'Swift/Controllers/UnitTest/MockChatWindow.h')
-rw-r--r--Swift/Controllers/UnitTest/MockChatWindow.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h
index 015bb9b..2625553 100644
--- a/Swift/Controllers/UnitTest/MockChatWindow.h
+++ b/Swift/Controllers/UnitTest/MockChatWindow.h
@@ -8,7 +8,7 @@ namespace Swift {
MockChatWindow() {};
virtual ~MockChatWindow();
- virtual void addMessage(const String& /*message*/, const String& /*senderName*/, bool /*senderIsSelf*/, const boost::optional<SecurityLabel>& /*label*/, const String& /*avatarPath*/) {};
+ virtual void addMessage(const String& message, const String& /*senderName*/, bool /*senderIsSelf*/, const boost::optional<SecurityLabel>& /*label*/, const String& /*avatarPath*/) {lastMessageBody_ = message;};
virtual void addSystemMessage(const String& /*message*/) {};
virtual void addErrorMessage(const String& /*message*/) {};
@@ -29,6 +29,7 @@ namespace Swift {
boost::signal<void (const String&)> onSendMessageRequest;
String name_;
+ String lastMessageBody_;
std::vector<SecurityLabel> labels_;
bool labelsEnabled_;
};