TestRail-API-57-methods.t 427 B

123456789101112131415
  1. use strict;
  2. use warnings;
  3. use Test::More tests => 2;
  4. use Test::MockModule ;
  5. use TestRail::API;
  6. my $mock = Test::MockModule->new('TestRail::API');
  7. $mock->mock('_doRequest', sub { shift; return shift; } );
  8. my $obj = bless ({},'TestRail::API');
  9. like($obj->getReports(666),qr{get_reports/666$}, "Correct endpoint called for getReports");
  10. like($obj->runReport(22), qr{run_report/22$}, "Correct endpoitn called for runReport");