Test Jobset's builds and channel pages
This commit is contained in:
parent
2803f06e6e
commit
a2adb8cfb6
31
t/Hydra/Controller/Jobset/builds.t
Normal file
31
t/Hydra/Controller/Jobset/builds.t
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Setup;
|
||||||
|
use Test2::V0;
|
||||||
|
use Catalyst::Test ();
|
||||||
|
use HTTP::Request::Common;
|
||||||
|
|
||||||
|
my $ctx = test_context();
|
||||||
|
|
||||||
|
Catalyst::Test->import('Hydra');
|
||||||
|
|
||||||
|
my $builds = $ctx->makeAndEvaluateJobset(
|
||||||
|
expression => "basic.nix",
|
||||||
|
build => 1
|
||||||
|
);
|
||||||
|
|
||||||
|
my $build = $builds->{"empty_dir"};
|
||||||
|
my $project = $build->project;
|
||||||
|
my $jobset = $build->jobset;
|
||||||
|
|
||||||
|
subtest "/jobset/PROJECT/JOBSET/all" => sub {
|
||||||
|
my $response = request(GET '/jobset/' . $project->name . '/' . $jobset->name . '/all');
|
||||||
|
ok($response->is_success, "The page showing the jobset's builds returns 200.");
|
||||||
|
};
|
||||||
|
|
||||||
|
subtest "/jobset/PROJECT/JOBSET/channel/latest" => sub {
|
||||||
|
my $response = request(GET '/jobset/' . $project->name . '/' . $jobset->name . '/channel/latest');
|
||||||
|
ok($response->is_success, "The page showing the jobset's builds returns 200.");
|
||||||
|
};
|
||||||
|
|
||||||
|
done_testing;
|
Loading…
Reference in a new issue