|
@@ -13,18 +13,18 @@ use Test::More "tests" => 6;
|
|
|
use IO::CaptureOutput qw{capture};
|
|
use IO::CaptureOutput qw{capture};
|
|
|
|
|
|
|
|
#check plan mode
|
|
#check plan mode
|
|
|
-my @args = (qw{-j TestProject -t}, 'HAMBURGER-IZE HUMANITY', qw{-d t --test --extension .test});
|
|
|
|
|
|
|
+my @args = (qw{--apiurl http://testrail.local --user test@fake.fake --password fake -j TestProject -t}, 'HAMBURGER-IZE HUMANITY', qw{-d t --test --extension .test});
|
|
|
my ($out,$code) = TestRail::Bin::Cases::run('browser' => $Test::LWP::UserAgent::TestRailMock::mockObject, 'args' => \@args);
|
|
my ($out,$code) = TestRail::Bin::Cases::run('browser' => $Test::LWP::UserAgent::TestRailMock::mockObject, 'args' => \@args);
|
|
|
is($code, 0, "Exit code OK running add, update, orphans");
|
|
is($code, 0, "Exit code OK running add, update, orphans");
|
|
|
chomp $out;
|
|
chomp $out;
|
|
|
like($out,qr/fake\.test/,"Shows existing tests by default");
|
|
like($out,qr/fake\.test/,"Shows existing tests by default");
|
|
|
|
|
|
|
|
-@args = (qw{-j TestProject -t}, 'HAMBURGER-IZE HUMANITY', qw{-d t -o --extension .test});
|
|
|
|
|
|
|
+@args = (qw{--apiurl http://testrail.local --user test@fake.fake --password fake -j TestProject -t}, 'HAMBURGER-IZE HUMANITY', qw{-d t -o --extension .test});
|
|
|
($out,$code) = TestRail::Bin::Cases::run('browser' => $Test::LWP::UserAgent::TestRailMock::mockObject, 'args' => \@args);
|
|
($out,$code) = TestRail::Bin::Cases::run('browser' => $Test::LWP::UserAgent::TestRailMock::mockObject, 'args' => \@args);
|
|
|
chomp $out;
|
|
chomp $out;
|
|
|
like($out,qr/nothere\.test/,"Shows orphan tests");
|
|
like($out,qr/nothere\.test/,"Shows orphan tests");
|
|
|
|
|
|
|
|
-@args = (qw{-j TestProject -t}, 'HAMBURGER-IZE HUMANITY', qw{-d t -m --extension .test});
|
|
|
|
|
|
|
+@args = (qw{--apiurl http://testrail.local --user test@fake.fake --password fake -j TestProject -t}, 'HAMBURGER-IZE HUMANITY', qw{-d t -m --extension .test});
|
|
|
($out,$code) = TestRail::Bin::Cases::run('browser' => $Test::LWP::UserAgent::TestRailMock::mockObject, 'args' => \@args);
|
|
($out,$code) = TestRail::Bin::Cases::run('browser' => $Test::LWP::UserAgent::TestRailMock::mockObject, 'args' => \@args);
|
|
|
chomp $out;
|
|
chomp $out;
|
|
|
like($out,qr/t\/skipall\.test/,"Shows missing tests");
|
|
like($out,qr/t\/skipall\.test/,"Shows missing tests");
|