testrail-bulk-mark-results.t 694 B

123456789101112131415161718
  1. use strict;
  2. use warnings;
  3. use Test::More "tests" => 4;
  4. my @args = ($^X,qw{bin/testrail-bulk-mark-results --help});
  5. my $out = `@args`;
  6. is($? >> 8, 0, "Exit code OK asking for help");
  7. like($out,qr/encoding of arguments/i,"Help output OK");
  8. #check plan mode
  9. @args = ($^X,qw{bin/testrail-bulk-mark-results --apiurl http://testrail.local --user "test@fake.fake" --password "fake" -j "CRUSH ALL HUMANS" -r "SEND T-1000 INFILTRATION UNITS BACK IN TIME" --mock blocked "Build was bad."});
  10. $out = `@args`;
  11. is($? >> 8, 0, "Exit code OK running against normal run");
  12. chomp $out;
  13. like($out,qr/set the status of 1 cases to blocked/,"Sets test correctly in single run mode");
  14. #TODO more thorough testing