[Bps-public-commit] rt-extension-rest2 branch master updated. 1.14-12-g6c0baa1

BPS Git Server git at git.bestpractical.com
Wed Jul 13 20:29:55 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-rest2".

The branch, master has been updated
       via  6c0baa1b794bda93b3a5e2a6bf7849dac9d470ef (commit)
       via  a4863417f0828d4cc23227ed0afcb21dd6cdc31f (commit)
      from  ce1fc176f3dc0ef4bca2cfe01557f71580c29be7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6c0baa1b794bda93b3a5e2a6bf7849dac9d470ef
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 14 03:35:10 2022 +0800

    Prep 1.17

diff --git a/Changes b/Changes
index ee1efd4..06b411a 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for RT-Extension-REST2
 
+1.17 2022-07-13
+ - Update tests for the custom field error message change in 4.4.6
+
 1.16 2022-04-11
  - Refactor CleanupRequest into a PSGI middleware module to make sure it
    gets called consistently.
diff --git a/META.yml b/META.yml
index 03e7504..6a13709 100644
--- a/META.yml
+++ b/META.yml
@@ -43,7 +43,7 @@ requires:
   perl: 5.10.1
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: '1.16'
+version: '1.17'
 x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.2.4
 x_rt_too_new: 5.0.0
diff --git a/lib/RT/Extension/REST2.pm b/lib/RT/Extension/REST2.pm
index 9ff91ea..9ccf326 100644
--- a/lib/RT/Extension/REST2.pm
+++ b/lib/RT/Extension/REST2.pm
@@ -4,7 +4,7 @@ use 5.010001;
 
 package RT::Extension::REST2;
 
-our $VERSION = '1.16';
+our $VERSION = '1.17';
 our $REST_PATH = '/REST/2.0';
 
 use Plack::Builder;

commit a4863417f0828d4cc23227ed0afcb21dd6cdc31f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 14 04:07:45 2022 +0800

    Update tests for the custom field value order change in 4.4.6
    
    As values are sorted by category first in 4.4.6, we make tests a bit
    more tolerant to make them pass on both 4.4.6 and earlier versions.
    
    See also 96400627db in RT.

diff --git a/xt/customfields.t b/xt/customfields.t
index 238606f..282b4f3 100644
--- a/xt/customfields.t
+++ b/xt/customfields.t
@@ -2,6 +2,7 @@ use strict;
 use warnings;
 use lib 't/lib';
 use RT::Extension::REST2::Test tests => undef;
+use Test::Deep;
 
 my $mech = RT::Extension::REST2::Test->mech;
 my $auth = RT::Extension::REST2::Test->authorization_header;
@@ -206,7 +207,7 @@ my $freeform_cf_id;
     like($links->[1]{_url}, qr{$rest_base_path/customfield/$basedon_cf_id/values$});
 
     my $values = $content->{Values};
-    is_deeply($values, ['With First Value', 'With No Value']);
+    cmp_deeply($values, bag('With First Value', 'With No Value'));
 }
 
 # BasedOn CustomField display with category filter
diff --git a/xt/customfieldvalues.t b/xt/customfieldvalues.t
index 9f9d5e1..5b03d11 100644
--- a/xt/customfieldvalues.t
+++ b/xt/customfieldvalues.t
@@ -19,7 +19,7 @@ my $select_cf_values = $select_cf->Values->ItemsArrayRef;
 my $basedon_cf = RT::CustomField->new(RT->SystemUser);
 $basedon_cf->Create(Name => 'SubSelect CF', Type => 'Select', MaxValues => 1, BasedOn => $select_cf->id);
 $basedon_cf->AddValue(Name => 'With First Value', Category => $select_cf_values->[0]->Name, SortOder => 0);
-$basedon_cf->AddValue(Name => 'With No Value', SortOder => 0);
+$basedon_cf->AddValue(Name => 'With No Value', Category => $select_cf_values->[1]->Name, SortOder => 0);
 my $basedon_cf_id = $basedon_cf->id;
 my $basedon_cf_values = $basedon_cf->Values->ItemsArrayRef;
 

-----------------------------------------------------------------------

Summary of changes:
 Changes                   | 3 +++
 META.yml                  | 2 +-
 lib/RT/Extension/REST2.pm | 2 +-
 xt/customfields.t         | 3 ++-
 xt/customfieldvalues.t    | 2 +-
 5 files changed, 8 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
rt-extension-rest2


More information about the Bps-public-commit mailing list