From: Errietta Kostala <errietta@errietta.me>
Date: Thu, 22 Jan 2015 14:43:35 +0000 (+0000)
Subject: Create test db before login
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb45a11f36674bff7cdff20f383fddfdfc4298b7;p=scpubgit%2Fstemmaweb.git

Create test db before login
---

diff --git a/Makefile.PL b/Makefile.PL
index 3155092..fa760b1 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -55,6 +55,7 @@ requires 'Config::General'; # This should reflect the config file format you've
 test_requires 'Test::More' => '0.88';
 test_requires 'LWP::Protocol::PSGI';
 test_requires 'Test::WWW::Mechanize';
+test_requires 'IPC::System::Simple';
 catalyst;
 
 install_script glob('script/*.pl');
diff --git a/t/04login.t b/t/04login.t
index 5816ab2..59043c6 100644
--- a/t/04login.t
+++ b/t/04login.t
@@ -9,6 +9,11 @@ use Test::More;
 use HTML::TreeBuilder;
 use Data::Dumper;
 
+use FindBin;
+
+use IPC::System::Simple qw(system);
+system("$FindBin::Bin/../script/maketestdb.pl");
+
 LWP::Protocol::PSGI->register(stemmaweb->psgi_app);
 
 my $ua = Test::WWW::Mechanize->new;