diff --git a/README.md b/README.md index 65d31e1..ee64079 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ Run the tests locally (against development environment) ## TODOs 1. Tests for remark form -1. Fix tests broken when 'view' was switched to 'list' 1. Return the last remark with remark form 1. Marked some items for clean up with comments 1. Method names may need to be shortened diff --git a/t/view.t b/t/list.t similarity index 59% rename from t/view.t rename to t/list.t index e4ebcc4..fd9bdb6 100644 --- a/t/view.t +++ b/t/list.t @@ -9,6 +9,7 @@ use Test::Mojo; my $script = curfile->dirname->sibling('PostText.pl'); 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(); diff --git a/t/post.t b/t/post.t index ce3bae5..d48c4ba 100644 --- a/t/post.t +++ b/t/post.t @@ -40,6 +40,6 @@ $t->post_ok('/post', form => \%invalid_post)->status_is(400) ->text_like(p => qr/Invalid post/); $t->post_ok('/post', form => \%valid_params)->status_is(200) - ->text_like(h2 => qr/View Threads/); + ->text_like(h2 => qr/Threads List/); done_testing(); diff --git a/t/thread.t b/t/thread.t index 0f17837..8af894b 100644 --- a/t/thread.t +++ b/t/thread.t @@ -9,6 +9,6 @@ use Test::Mojo; my $script = curfile->dirname->sibling('PostText.pl'); 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();