2021-04-26 23:29:04 +00:00
|
|
|
use feature 'unicode_strings';
|
|
|
|
use strict;
|
|
|
|
use Setup;
|
|
|
|
use JSON qw(decode_json);
|
|
|
|
|
|
|
|
my %ctx = test_init();
|
|
|
|
|
|
|
|
require Hydra::Schema;
|
|
|
|
require Hydra::Model::DB;
|
|
|
|
require Hydra::Helper::Nix;
|
|
|
|
use HTTP::Request::Common;
|
|
|
|
|
|
|
|
use Test2::V0;
|
|
|
|
require Catalyst::Test;
|
|
|
|
Catalyst::Test->import('Hydra');
|
|
|
|
|
|
|
|
my $db = Hydra::Model::DB->new;
|
|
|
|
hydra_setup($db);
|
|
|
|
|
|
|
|
my $project = $db->resultset('Projects')->create({name => "tests", displayname => "", owner => "root"});
|
|
|
|
|
|
|
|
my $projectinfo = request(GET '/project/tests',
|
|
|
|
Accept => 'application/json',
|
|
|
|
);
|
|
|
|
|
|
|
|
ok($projectinfo->is_success);
|
|
|
|
is(decode_json($projectinfo->content), {
|
2021-04-26 23:37:25 +00:00
|
|
|
description => "",
|
2021-04-26 23:29:04 +00:00
|
|
|
displayname => "",
|
|
|
|
enabled => JSON::true,
|
|
|
|
hidden => JSON::false,
|
2021-04-26 23:37:25 +00:00
|
|
|
homepage => "",
|
2021-04-26 23:29:04 +00:00
|
|
|
jobsets => [],
|
|
|
|
name => "tests",
|
2021-05-02 06:27:47 +00:00
|
|
|
owner => "root",
|
|
|
|
declarative => {
|
|
|
|
file => "",
|
|
|
|
type => "",
|
|
|
|
value => ""
|
|
|
|
}
|
2021-04-26 23:29:04 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
done_testing;
|