test: add snapshot tests for MessageBuilder (#5598)

This commit is contained in:
nerix
2024-10-13 12:38:10 +02:00
committed by GitHub
parent 3e2116629a
commit d9453313b3
90 changed files with 14661 additions and 218 deletions
+17
View File
@@ -174,6 +174,17 @@ void TwitchAccount::unblockUser(const QString &userId, const QObject *caller,
std::move(onFailure));
}
void TwitchAccount::blockUserLocally(const QString &userID)
{
assertInGuiThread();
assert(getApp()->isTest());
TwitchUser blockedUser;
blockedUser.id = userID;
this->ignores_.insert(blockedUser);
this->ignoresUserIds_.insert(blockedUser.id);
}
const std::unordered_set<TwitchUser> &TwitchAccount::blocks() const
{
assertInGuiThread();
@@ -336,6 +347,12 @@ SharedAccessGuard<std::shared_ptr<const EmoteMap>> TwitchAccount::accessEmotes()
return this->emotes_.accessConst();
}
void TwitchAccount::setEmotes(std::shared_ptr<const EmoteMap> emotes)
{
assert(getApp()->isTest());
*this->emotes_.access() = std::move(emotes);
}
std::optional<EmotePtr> TwitchAccount::twitchEmote(const EmoteName &name) const
{
auto emotes = this->emotes_.accessConst();