aboutsummaryrefslogtreecommitdiff
path: root/quotest
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-07-11 10:15:09 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-07-11 11:27:16 +0200
commite2ea64c603b1e4b2184e363ee0d0a13fa0e286a0 (patch)
tree7d94ed526b95d08fa44c87785e9c2afddedcaf72 /quotest
parent267219c955b938483c3d113e455c4abd96ef8ce6 (diff)
downloadlibquotient-e2ea64c603b1e4b2184e363ee0d0a13fa0e286a0.tar.gz
libquotient-e2ea64c603b1e4b2184e363ee0d0a13fa0e286a0.zip
Add QUOTIENT_API to RoomStateView
Fixing link errors at non-template RoomStateView::get() when building with libQuotient as a shared object. There's also a test in quotest.cpp now to cover that case.
Diffstat (limited to 'quotest')
-rw-r--r--quotest/quotest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/quotest/quotest.cpp b/quotest/quotest.cpp
index 6bcd71cd..90a5a69b 100644
--- a/quotest/quotest.cpp
+++ b/quotest/quotest.cpp
@@ -588,6 +588,14 @@ TEST_IMPL(changeName)
if (!rme->newDisplayName()
|| *rme->newDisplayName() != newName)
FAIL_TEST();
+ // State events coming in the timeline are first
+ // processed to change the room state and then as
+ // timeline messages; aboutToAddNewMessages is triggered
+ // when the state is already updated, so check that
+ if (targetRoom->currentState().get<RoomMemberEvent>(
+ localUser->id())
+ != rme)
+ FAIL_TEST();
clog << "Member rename successful, renaming the account"
<< endl;
const auto newN = newName.mid(0, 5);