Removed execution flag from non-exe files
[Fumo.git] / t / 03-revision-pass-rate.t
blobe645716f940e1da5bf86bbda667b7d3e8bf8cb25
1 use Test::More 'no_plan';
2 use Test::Exception;
4 use strict;
5 use warnings;
7 BEGIN { use_ok 'Fumo::Schema' }
9 SKIP: {
10     skip('FUMO_TEST_DSN environment variable not set', 3)
11         unless $ENV{FUMO_TEST_DSN};
13     # grab the schema
14     my $schema = Fumo::Schema->connect($ENV{FUMO_TEST_DSN});
15     isa_ok($schema, 'Fumo::Schema');
17     my $revision_rs = $schema->resultset('Revision')->find({
18         project => 'Project1',
19         branch  => 'Branch1',
20         name    => 'Revision3'
21     });
23     # should be 50%
24     cmp_ok($revision_rs->pass_rate(), '==', 50, 'passrate is 50%');