summaryrefslogtreecommitdiff
path: root/ui/tests/widgets/participant_row.cpp
blob: f2af510193193e6760d2d78be3cd64c867b1fdbf (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
#include "turns/ui/widgets/participant_row.hpp"

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

#include <catch2/catch_test_macros.hpp>

namespace turns::app::widgets::tests
{

  TEST_CASE("A freshly constructed participant row")
  {
    SECTION("can be created without a participant")
    {
      REQUIRE(Gtk::make_managed<participant_row>(Glib::RefPtr<core::participant>{}));
    }

    SECTION("can be created with a participant")
    {
      REQUIRE(Gtk::make_managed<participant_row>(core::participant::create("Tazmyla Fireforge", 13, core::disposition::secret)));
    }
  }

}  // namespace turns::app::widgets::tests