Skip to content
Browse files

Fixed the link to the releases on the author's page.

Added a regression test for it, too.
  • Loading branch information...
1 parent c1eda19 commit 15d7940504e09df97d39e42b7db15b506ee85b4b @shlomif shlomif committed Jul 22, 2009
Showing with 37 additions and 1 deletion.
  1. +1 −1 root/author/show.tt
  2. +36 −0 t/controller_Author_mech.t
View
2 root/author/show.tt
@@ -43,7 +43,7 @@ $(document).ready(function(){
[% releases = author.releases_rs %]
<ul>
[% WHILE( release = releases.next ) %]
-<li><a href="[% c.uri_for( '/dist', release.distribution.name, release.version ) %]">[% release.name %]</a> on [% release.release_date.ymd %]</li>
+<li><a href="[% c.uri_for( '/dist', release.distribution.name, 'release', release.version ) %]">[% release.name %]</a> on [% release.release_date.ymd %]</li>
[% END %]
</ul>
</div>
View
36 t/controller_Author_mech.t
@@ -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://telaviv1.shlomifish.org:3000/author/SHLOMIF");
+
+ # TEST
+ $mech->follow_link_ok(
+ {
+ text_regex => qr{Statistics-Descriptive \d},
+ },
+ "Following the 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 15d7940

Please sign in to comment.
Something went wrong with that request. Please try again.