Skip to content

Commit

Permalink
just do the exact same thing the server does
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 12, 2015
1 parent 0175e4a commit f0f3e91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,5 +1,6 @@

6.03 2015-03-11
6.03 2015-03-12
- Improved portability of content negotiation tests.

6.02 2015-03-09
- Added daemon attribute to Mojo::Server::Morbo.
Expand Down
8 changes: 5 additions & 3 deletions t/mojolicious/app.t
Expand Up @@ -12,6 +12,7 @@ use FindBin;
use lib "$FindBin::Bin/lib";

use File::Spec::Functions 'catdir';
use Mojo::Asset::File;
use Mojo::Date;
use Mojolicious;
use Test::Mojo;
Expand Down Expand Up @@ -397,9 +398,10 @@ like $log, qr/Controller "MojoliciousTest::Another" does not exist/,
$t->app->log->unsubscribe(message => $cb);

# Check Last-Modified header for static files
my $path = catdir($FindBin::Bin, 'public_dev', 'hello.txt');
my $size = (stat $path)[7];
my $mtime = Mojo::Date->new((stat $path)[9])->to_string;
my $path = catdir($FindBin::Bin, 'public_dev', 'hello.txt');
my $size = Mojo::Asset::File->new(path => $path)->size;
my $mtime
= Mojo::Date->new(Mojo::Asset::File->new(path => $path)->mtime)->to_string;

# Static file /hello.txt
$t->get_ok('/hello.txt')->status_is(200)
Expand Down

0 comments on commit f0f3e91

Please sign in to comment.