aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/my_planned.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/my_planned.t')
-rw-r--r--t/app/controller/my_planned.t16
1 files changed, 14 insertions, 2 deletions
diff --git a/t/app/controller/my_planned.t b/t/app/controller/my_planned.t
index 7bd1dd2cd..fa463e61e 100644
--- a/t/app/controller/my_planned.t
+++ b/t/app/controller/my_planned.t
@@ -40,11 +40,23 @@ $mech->content_contains('Test Title');
$mech->get_ok($problem->url);
$mech->content_contains('Shortlisted');
-$mech->submit_form_ok({ with_fields => { change => 'remove' } });
+$mech->submit_form_ok({ with_fields => { 'shortlist-remove' => 1 } });
$mech->content_contains('Shortlist');
-$mech->submit_form_ok({ with_fields => { change => 'add' } });
+$mech->submit_form_ok({ with_fields => { 'shortlist-add' => 1 } });
$mech->content_contains('Shortlisted');
+$mech->get_ok('/my/planned?sort=shortlist&ajax=1');
+$mech->content_contains('shortlist-up');
+$mech->content_contains('shortlist-down');
+
+$mech->get_ok('/my/planned?sort=created-desc&ajax=1');
+$mech->content_lacks('shortlist-up');
+$mech->content_lacks('shortlist-down');
+
+$mech->get_ok('/my/planned?ajax=1');
+$mech->content_contains('shortlist-up');
+$mech->content_contains('shortlist-down');
+
done_testing();
END {