Fixed tests to expect the new List routes instead of the old View ones
This commit is contained in:
parent
59c14fac0b
commit
75418bf1aa
|
@ -25,7 +25,6 @@ Run the tests locally (against development environment)
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
1. Tests for remark form
|
1. Tests for remark form
|
||||||
1. Fix tests broken when 'view' was switched to 'list'
|
|
||||||
1. Return the last remark with remark form
|
1. Return the last remark with remark form
|
||||||
1. Marked some items for clean up with comments
|
1. Marked some items for clean up with comments
|
||||||
1. Method names may need to be shortened
|
1. Method names may need to be shortened
|
||||||
|
|
|
@ -9,6 +9,7 @@ use Test::Mojo;
|
||||||
my $script = curfile->dirname->sibling('PostText.pl');
|
my $script = curfile->dirname->sibling('PostText.pl');
|
||||||
my $t = Test::Mojo->new($script);
|
my $t = Test::Mojo->new($script);
|
||||||
|
|
||||||
$t->get_ok('/view')->status_is(200)->text_like(h2 => qr/View Threads/);
|
$t->get_ok('/list' )->status_is(200)->text_like(h2 => qr/Threads List/);
|
||||||
|
$t->get_ok('/list/1')->status_is(200)->text_like(h2 => qr/Threads List/);
|
||||||
|
|
||||||
done_testing();
|
done_testing();
|
2
t/post.t
2
t/post.t
|
@ -40,6 +40,6 @@ $t->post_ok('/post', form => \%invalid_post)->status_is(400)
|
||||||
->text_like(p => qr/Invalid post/);
|
->text_like(p => qr/Invalid post/);
|
||||||
|
|
||||||
$t->post_ok('/post', form => \%valid_params)->status_is(200)
|
$t->post_ok('/post', form => \%valid_params)->status_is(200)
|
||||||
->text_like(h2 => qr/View Threads/);
|
->text_like(h2 => qr/Threads List/);
|
||||||
|
|
||||||
done_testing();
|
done_testing();
|
||||||
|
|
|
@ -9,6 +9,6 @@ use Test::Mojo;
|
||||||
my $script = curfile->dirname->sibling('PostText.pl');
|
my $script = curfile->dirname->sibling('PostText.pl');
|
||||||
my $t = Test::Mojo->new($script);
|
my $t = Test::Mojo->new($script);
|
||||||
|
|
||||||
$t->get_ok('/thread/1')->status_is(200)->text_like(h2 => qr/View Thread - #1/);
|
$t->get_ok('/thread/1')->status_is(200)->text_like(h2 => qr/Thread - #1/);
|
||||||
|
|
||||||
done_testing();
|
done_testing();
|
||||||
|
|
Loading…
Reference in a new issue