瀏覽代碼

Fix issue where do_post_redirect could not be passed to constructor

George S. Baugh 8 年之前
父節點
當前提交
ff44f5ddeb
共有 3 個文件被更改,包括 5 次插入2 次删除
  1. 3 0
      Changes
  2. 1 1
      lib/TestRail/API.pm
  3. 1 1
      t/TestRail-API.t

+ 3 - 0
Changes

@@ -1,5 +1,8 @@
 Revision history for Perl module TestRail::API
 
+0.039 2017-02-20 TEODESIAN
+    - Fix issue where follow_post_redirect could not be passed to constructor
+
 0.038 2017-01-23 TEODESIAN
     - Optimize TestRail::Utils::Find::getResults and testrail-results
     - Add ability to follow POST redirects

+ 1 - 1
lib/TestRail/API.pm

@@ -87,7 +87,7 @@ Does not do above checks if debug is passed.
 =cut
 
 sub new {
-    state $check = compile(ClassName, Str, Str, Str, Optional[Maybe[Str]], Optional[Maybe[Bool]]);
+    state $check = compile(ClassName, Str, Str, Str, Optional[Maybe[Str]], Optional[Maybe[Bool]], Optional[Maybe[Bool]]);
     my ($class,$apiurl,$user,$pass,$encoding,$debug, $do_post_redirect) = $check->(@_);
 
     die("Invalid URI passed to constructor") if !is_uri($apiurl);

+ 1 - 1
t/TestRail-API.t

@@ -32,7 +32,7 @@ SKIP: {
 SKIP: {
     skip("Testing authentication not supported with mock",2) if ($is_mock);
 
-    like(exception {TestRail::API->new($apiurl,'lies','moreLies',undef,0); }, qr/Bad user credentials/i,"Bogus Testrail User rejected");
+    like(exception {TestRail::API->new($apiurl,'lies','moreLies',undef,0,0); }, qr/Bad user credentials/i,"Bogus Testrail User rejected");
     like(exception {TestRail::API->new($apiurl,$login,'m043L13s                      ',undef,0); }, qr/Bad user credentials/i,"Bogus Testrail Password rejected");
 }