summaryrefslogtreecommitdiff
path: root/ui/tests/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'ui/tests/widgets')
-rw-r--r--ui/tests/widgets/participant_row.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/ui/tests/widgets/participant_row.cpp b/ui/tests/widgets/participant_row.cpp
new file mode 100644
index 0000000..f2af510
--- /dev/null
+++ b/ui/tests/widgets/participant_row.cpp
@@ -0,0 +1,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 \ No newline at end of file