X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=.build%2F0ey2IQdAX1%2Ft%2FDeploy%2Fgit.t;fp=.build%2F0ey2IQdAX1%2Ft%2FDeploy%2Fgit.t;h=205665c04fe1edbb7594701011bb006a44c64be9;hb=6b832bd6eabfef633627b14a5252110b8653e310;hp=0000000000000000000000000000000000000000;hpb=83928564ffca265f67e17d34adc15d12d5319537;p=p5sagit%2FOyster.git diff --git a/.build/0ey2IQdAX1/t/Deploy/git.t b/.build/0ey2IQdAX1/t/Deploy/git.t new file mode 100644 index 0000000..205665c --- /dev/null +++ b/.build/0ey2IQdAX1/t/Deploy/git.t @@ -0,0 +1,24 @@ +#!/usr/local/bin/perl + +use strict; +use warnings; + +use Test::More qw/no_plan/; +use Test::Exception; + +use File::Temp qw/tempdir/; + +BEGIN { use_ok( 'Oyster::Deploy::Git' ); } + +my $tmpdir = tempdir(); + +my $deploy = new_ok 'Oyster::Deploy::Git'; + +#create +is($deploy->create("${tmpdir}/testapp"), 1, 'Create returned okay'); + +ok((-d "${tmpdir}/testapp"), "App directory created"); + +throws_ok(sub {$deploy->create("${tmpdir}/testapp")}, 'Error::Simple', "Directory already exists"); +ok((-f "${tmpdir}/testapp/.git/hooks/post-receive"), "Post reveive hook exists"); +ok((-f "${tmpdir}/testapp/.git/hooks/post-update"), "Post update hook exists"); \ No newline at end of file