|
|
@@ -7,8 +7,7 @@ use Test::LWP::UserAgent::TestRailMock;
|
|
|
use Test::More tests => 71;
|
|
|
use Test::Fatal;
|
|
|
use Test::Deep;
|
|
|
-use Scalar::Util 'reftype';
|
|
|
-use ExtUtils::MakeMaker qw{prompt};
|
|
|
+use Scalar::Util ();
|
|
|
|
|
|
my $apiurl = $ENV{'TESTRAIL_API_URL'};
|
|
|
my $login = $ENV{'TESTRAIL_USER'};
|
|
|
@@ -67,7 +66,7 @@ is($new_project->{'name'},$project_name,"Can create new project");
|
|
|
ok($tr->getProjects(),"Get Projects returns list");
|
|
|
is($tr->getProjectByName($project_name)->{'name'},$project_name,"Can get project by name");
|
|
|
my $pjid = $tr->getProjectByID($new_project->{'id'});
|
|
|
-is(reftype($pjid) eq 'HASH' ? $pjid->{'id'} : $pjid,$new_project->{'id'},"Can get project by id");
|
|
|
+is(Scalar::Util::reftype($pjid) eq 'HASH' ? $pjid->{'id'} : $pjid,$new_project->{'id'},"Can get project by id");
|
|
|
|
|
|
#Test TESTSUITE methods
|
|
|
my $suite_name = 'HAMBURGER-IZE HUMANITY';
|
|
|
@@ -182,7 +181,7 @@ is($summary->{'run_status'}->{'untested'},int($is_mock),"Gets # of untested case
|
|
|
|
|
|
#Test configuration methods
|
|
|
my $configs = $tr->getConfigurations($new_project->{'id'});
|
|
|
-my $is_arr = is(reftype($configs),'ARRAY',"Can get configurations for a project");
|
|
|
+my $is_arr = is(Scalar::Util::reftype($configs),'ARRAY',"Can get configurations for a project");
|
|
|
my (@config_names,@config_ids);
|
|
|
if ($is_arr) {
|
|
|
@config_names = map {$_->{'name'}} @$configs;
|