summaryrefslogtreecommitdiff
path: root/ui/tests/participant_row.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-29 16:33:32 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-29 16:33:32 +0200
commit3ff5bd46952144926d9bd9beedf50023a51913ee (patch)
tree2c579fe13bbb5cc90f8f50e7af35218c98e123d5 /ui/tests/participant_row.cpp
parent873bf396b904ce477a238f22d1891e1b03f24eff (diff)
downloadturns-3ff5bd46952144926d9bd9beedf50023a51913ee.tar.xz
turns-3ff5bd46952144926d9bd9beedf50023a51913ee.zip
ui: flatten namespace hierarchy
Diffstat (limited to 'ui/tests/participant_row.cpp')
-rw-r--r--ui/tests/participant_row.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/ui/tests/participant_row.cpp b/ui/tests/participant_row.cpp
new file mode 100644
index 0000000..5d89c42
--- /dev/null
+++ b/ui/tests/participant_row.cpp
@@ -0,0 +1,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<participant_row>(Glib::RefPtr<core::participant>{}));
+ }
+
+ SECTION("can be created with a participant")
+ {
+ REQUIRE(std::make_shared<participant_row>(core::participant::create("Tazmyla Fireforge", 13, core::disposition::secret)));
+ }
+ }
+
+} // namespace turns::ui::widgets::tests \ No newline at end of file