Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F111997
join-test.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
join-test.cpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2021-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<libkazv-config.hpp>
#include
<catch2/catch_all.hpp>
#include
<boost/asio.hpp>
#include
<asio-promise-handler.hpp>
#include
<cursorutil.hpp>
#include
<sdk-model.hpp>
#include
<client/client.hpp>
#include
"client-test-util.hpp"
TEST_CASE
(
"Send join job with alias"
,
"[client][membership]"
)
{
ClientModel
loggedInModel
=
createTestClientModel
();
auto
[
resModel
,
dontCareEffect
]
=
ClientModel
::
update
(
loggedInModel
,
JoinRoomAction
{
"#room:example.com"
,
{}});
assert1Job
(
resModel
);
for1stJob
(
resModel
,
[]
(
const
auto
&
job
)
{
REQUIRE
(
job
.
jobId
()
==
"JoinRoom"
);
REQUIRE
(
job
.
url
().
find
(
"%23room:example.com"
)
!=
std
::
string
::
npos
);
});
}
TEST_CASE
(
"Send join job with id"
,
"[client][membership]"
)
{
ClientModel
loggedInModel
=
createTestClientModel
();
auto
[
resModel
,
dontCareEffect
]
=
ClientModel
::
update
(
loggedInModel
,
JoinRoomAction
{
"!room:example.com"
,
{}});
assert1Job
(
resModel
);
for1stJob
(
resModel
,
[]
(
const
auto
&
job
)
{
REQUIRE
(
job
.
jobId
()
==
"JoinRoom"
);
REQUIRE
(
job
.
url
().
find
(
"!room:example.com"
)
!=
std
::
string
::
npos
);
});
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Nov 22, 9:07 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38711
Default Alt Text
join-test.cpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment