summaryrefslogtreecommitdiff
path: root/ui/tests/participant_row.cpp
blob: 20eaa5c71b0230bd2ff37623e4b1d5234c49904f (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
#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