Event.pm: add a new_event helper to parse and construct an Event
An Event will be part of many Tasks
This commit is contained in:
committed by
Your Name
parent
64a3e75c10
commit
4e86e55008
@ -7,6 +7,13 @@ use Hydra::Event::StepFinished;
|
||||
use Test2::V0;
|
||||
use Test2::Tools::Exception;
|
||||
|
||||
subtest "Event: new event" => sub {
|
||||
my $event = Hydra::Event->new_event("build_started", "19");
|
||||
is($event->{'payload'}, "19");
|
||||
is($event->{'channel_name'}, "build_started");
|
||||
is($event->{'event'}->{'build_id'}, 19);
|
||||
};
|
||||
|
||||
subtest "Payload type: build_started" => sub {
|
||||
like(
|
||||
dies { Hydra::Event::parse_payload("build_started", "") },
|
||||
|
Reference in New Issue
Block a user