summaryrefslogtreecommitdiff
path: root/lib/tests/turns-turn-order.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/turns-turn-order.cpp')
-rw-r--r--lib/tests/turns-turn-order.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/tests/turns-turn-order.cpp b/lib/tests/turns-turn-order.cpp
index 9f4d5d6..d0224ce 100644
--- a/lib/tests/turns-turn-order.cpp
+++ b/lib/tests/turns-turn-order.cpp
@@ -148,5 +148,19 @@ SCENARIO("Sorting a turn order")
REQUIRE(second == participant_b);
}
}
+
+ WHEN("the sort mode is changed to ascending")
+ {
+ turns_turn_order_set_sort_mode(instance, TURNS_TURN_ORDER_SORT_MODE_ASCENDING);
+
+ THEN("A is the first and B the second element")
+ {
+ g_autoptr(TurnsParticipant) first = TURNS_PARTICIPANT(g_list_model_get_object(G_LIST_MODEL(instance), 0));
+ g_autoptr(TurnsParticipant) second = TURNS_PARTICIPANT(g_list_model_get_object(G_LIST_MODEL(instance), 1));
+
+ REQUIRE(first == participant_a);
+ REQUIRE(second == participant_b);
+ }
+ }
}
} \ No newline at end of file