summaryrefslogtreecommitdiff
path: root/gui/tests/participant_row.cpp
blob: e32be78a496aab5407cf080d6a649f0f8887ff05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com>
 * SPDX-License-Identifier: LGPL-2.1-only
 */

#include "turns/ui/participant_row.hpp"

#include "turns/core/disposition.hpp"
#include "turns/core/participant.hpp"

#include <catch2/catch_test_macros.hpp>

#include <glibmm/refptr.h>

#include <gtkmm/object.h>

#include <memory>

namespace turns::ui::tests
{

  TEST_CASE("A freshly constructed participant row")
  {
    SECTION("can be created without a participant")
    {
      REQUIRE(std::make_shared<ParticipantRow>(Glib::RefPtr<core::Participant>{}));
    }

    SECTION("can be created with a participant")
    {
      REQUIRE(std::make_shared<ParticipantRow>(core::Participant::create("Tazmyla Fireforge", 13, core::Disposition::Secret)));
    }
  }

}  // namespace turns::ui::widgets::tests