Update tests
[app-musicexpo.git] / t / musicexpo-cache.t
CommitLineData
8086953c 1#!/usr/bin/perl -wT
23867054
MG
2use v5.14;
3use warnings;
4
5use Test::More tests => 3;
6
7use File::Temp qw/tempfile/;
8use DB_File;
9use Storable qw/thaw/;
10
11my $file;
12
13BEGIN {
14 $file = (tempfile UNLINK => 1)[1];
15 @ARGV = (-cache => $file, 'empty.flac', 'empty.mp3');
16}
17BEGIN { use_ok('App::MusicExpo'); }
18
19close STDOUT;
20my $out;
21open STDOUT, '>', \$out;
22
23App::MusicExpo->run;
24
25is $out, <<'OUT', 'output is correct';
26<!DOCTYPE html>
27<title>Music</title>
28<meta charset="utf-8">
6b125df7 29<link rel="stylesheet" href="musicexpo.css">
1fc49a0c
MG
30<script async defer type="application/javascript" src="player.js"></script>
31
32<div id="player"></div>
23867054
MG
33
34<table border>
35<thead>
36<tr><th>Title<th>Artist<th>Album<th>Genre<th>Track<th>Year<th>Type
37<tbody>
6b125df7 38<tr><td class="title">Cellule<td class="artist">Silence<td class="album">L&#39;autre endroit<td class="genre">Electro<td class="track">01/09<td class="year">2005<td class="formats"><a href="/music/empty.flac">FLAC</a> <a href="/music/empty.mp3">MP3</a>
23867054
MG
39</table>
40OUT
41
42ok -e $file, 'cache exists';
43tie my %db, DB_File => $file;
This page took 0.010892 seconds and 4 git commands to generate.