summaryrefslogtreecommitdiff
path: root/app/tests/widgets/participant_row.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/tests/widgets/participant_row.cpp')
-rw-r--r--app/tests/widgets/participant_row.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/tests/widgets/participant_row.cpp b/app/tests/widgets/participant_row.cpp
new file mode 100644
index 0000000..0e91ad7
--- /dev/null
+++ b/app/tests/widgets/participant_row.cpp
@@ -0,0 +1,30 @@
+#include "turns/app/widgets/participant_row.hpp"
+
+#include "turns/domain/participant.hpp"
+#include "turns/lang/messages.hpp"
+
+#include <catch2/catch_test_macros.hpp>
+#include <catch2/generators/catch_generators.hpp>
+
+#include <algorithm>
+#include <string>
+
+#include <gtkmm/widget.h>
+
+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<domain::participant>{}));
+ }
+
+ SECTION("can be created with a participant")
+ {
+ REQUIRE(Gtk::make_managed<participant_row>(domain::participant::create("Tazmyla Fireforge", 13)));
+ }
+ }
+
+} // namespace turns::app::widgets::tests \ No newline at end of file