From dcefb8837366f6b4e02ccb63d455c56f846c6981 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 14 Jan 2022 10:36:05 -0500 Subject: [PATCH] test /project/NAME/all returns a 200 --- t/Hydra/Controller/Project/builds.t | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 t/Hydra/Controller/Project/builds.t diff --git a/t/Hydra/Controller/Project/builds.t b/t/Hydra/Controller/Project/builds.t new file mode 100644 index 00000000..7ea5ed58 --- /dev/null +++ b/t/Hydra/Controller/Project/builds.t @@ -0,0 +1,25 @@ +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; + +subtest "/project/PROJECT/all" => sub { + my $response = request(GET '/project/' . $project->name . '/all'); + ok($response->is_success, "The page showing the project's builds returns 200."); +}; + +done_testing;