Permalink
Browse files

Fixed the links to the releases in /recent/.

  • Loading branch information...
shlomif committed Jul 22, 2009
1 parent 15d7940 commit 9c7370ab7cc09b45c1eaf1110f08ff435afb2cff
Showing with 37 additions and 1 deletion.
  1. +1 −1 root/recent.tt
  2. +36 −0 t/controller_Recent_mech.t
View
@@ -9,6 +9,6 @@
<p>[% date_head %]</p>
<ul>
[% END %]
- <li><a href="[% c.uri_for( '/dist', release.distribution.name, release.version) %]">[% release.name %]</a></li>
+ <li><a href="[% c.uri_for( '/dist', release.distribution.name, 'release', release.version) %]">[% release.name %]</a></li>
[% END %]
</ul>
View
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+use Test::WWW::Mechanize::Catalyst 'CPANHQ';
+
+{
+ my $mech = Test::WWW::Mechanize::Catalyst->new;
+
+ # TEST
+ $mech->get_ok("http://localhost/recent");
+
+ # TEST
+ $mech->follow_link_ok(
+ {
+ text_regex => qr{[\w\-]+ \d},
+ },
+ "Following a link to the release works."
+ );
+}
+
+=head1 AUTHOR
+
+Shlomi Fish L<http://www.shlomifish.org/> .
+
+=head1 LICENSE
+
+This module is free software, available under the MIT X11 Licence:
+
+L<http://www.opensource.org/licenses/mit-license.php>
+
+Copyright by Shlomi Fish, 2009.
+
+=cut
+

0 comments on commit 9c7370a

Please sign in to comment.