Skip to content
This repository
tree: 1430cdf802
Fetching contributors…

Cannot retrieve contributors at this time

file 51 lines (37 sloc) 1.057 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
use strict;
use warnings;
use Test::More tests => 6;

use Catalyst::Test 'CPANHQ';

use CPANHQ::Storage;

{
    my $schema1 = CPANHQ->model("DB");

    # TEST
    ok ($schema1, "Schema was initialized");

    my $releases_rs = $schema1->resultset('Release');

    # TEST
    ok ($releases_rs, "Releases result set is OK.");

    my $rec1 = $releases_rs->find({
            distribution_id =>
                $schema1->resultset('Distribution')->find(
                    {
                        name => "Games-Solitaire-Verify",
                    }
                )->id(),
            version => "0.08",
        }
    );

    # TEST
    ok ($rec1, "Record1 is OK.");

    my $meta_yml = $rec1->_get_meta_yml();

    # TEST
    ok ($meta_yml, "META.yml of Games-Solitaire-Verify is OK.");

    # TEST
    is ($meta_yml->{'abstract'}, "verify solutions for solitaire games.",
        "Abstract of META.yml is OK."
    );

    # TEST
    is ($meta_yml->{'license'}, "mit",
        "License of META.yml is OK."
    );

    $rec1->_process_meta_yml();

}
Something went wrong with that request. Please try again.