[Jifty-commit] r500 - in jifty/trunk: t/TestApp/t
t/TestApp/web/static/images t/TestApp/web/templates
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Jan 12 20:55:16 EST 2006
Author: kevinr
Date: Thu Jan 12 20:55:15 2006
New Revision: 500
Added:
jifty/trunk/t/TestApp/t/16-images.t
jifty/trunk/t/TestApp/web/static/images/pony.jpg (contents, props changed)
jifty/trunk/t/TestApp/web/templates/index.html
Modified:
jifty/trunk/ (props changed)
Log:
r10311 at SAD-GIRL-IN-SNOW: kevinr | 2006-01-09 19:02:07 -0500
* Ported another test from Hiveminder
Added: jifty/trunk/t/TestApp/t/16-images.t
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp/t/16-images.t Thu Jan 12 20:55:15 2006
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+
+use Jifty::Test tests => 5;
+use Jifty::Test::WWW::Mechanize;
+
+my $server = Jifty::Test->make_server;
+
+isa_ok($server, 'Jifty::Server');
+
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new();
+
+for my $image (qw(pony.jpg)) {
+ $mech->get_ok("$URL/images/$image");
+ my $res = $mech->response;
+
+ is($res->header('Content-Type'), 'image/jpeg', 'Content-Type is image/jpeg');
+ like($res->status_line, qr/^200 H::S::Mason OK$/, 'Status line is from Mason');
+}
+
Added: jifty/trunk/t/TestApp/web/static/images/pony.jpg
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/t/TestApp/web/templates/index.html
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp/web/templates/index.html Thu Jan 12 20:55:15 2006
@@ -0,0 +1,3 @@
+<&|/_elements/wrapper, title => 'Jifty Test Application' &>
+<img src="/images/pony.jpg" />
+</&>
More information about the Jifty-commit
mailing list