Skip to content

Commit

Permalink
Update tests for Oracle handle changes in DBIx::SearchBuilder 1.82
Browse files Browse the repository at this point in the history
On Oracle, all not defined CLOB fields are set to NULL now, like VARCHAR.
  • Loading branch information
sunnavy committed Apr 23, 2024
1 parent a5b80f5 commit ef2c3fb
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions t/rest2/customfields.t
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ my $freeform_cf_id;
Type => 'Freeform',
LookupType => 'RT::Queue-RT::Ticket',
MaxValues => 1,
Pattern => '(?#Mandatory).',
};
my $res = $mech->post_json("$rest_base_path/customfield",
$payload,
Expand Down Expand Up @@ -157,7 +158,9 @@ my $freeform_cf_id;
is($content->{MaxValues}, 1);
is($content->{Disabled}, 0);

my @fields = qw(SortOrder Pattern Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
my @fields = qw(SortOrder Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
# Pattern is undef by default on Oralce and thus excluded from the response
push @fields, 'Pattern' unless RT->Config->Get('DatabaseType') eq 'Oracle';
ok(exists $content->{$_}, "got $_") for @fields;

my $links = $content->{_hyperlinks};
Expand Down Expand Up @@ -189,7 +192,9 @@ my $freeform_cf_id;
is($content->{MaxValues}, 1);
is($content->{Disabled}, 0);

my @fields = qw(SortOrder Pattern Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
my @fields = qw(SortOrder Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
# Pattern is undef by default on Oralce and thus excluded from the response
push @fields, 'Pattern' unless RT->Config->Get('DatabaseType') eq 'Oracle';
ok(exists $content->{$_}, "got $_") for @fields;

my $links = $content->{_hyperlinks};
Expand Down Expand Up @@ -228,7 +233,9 @@ my $freeform_cf_id;
is($content->{MaxValues}, 1);
is($content->{Disabled}, 0);

my @fields = qw(SortOrder Pattern Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
my @fields = qw(SortOrder Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
# Pattern is undef by default on Oralce and thus excluded from the response
push @fields, 'Pattern' unless RT->Config->Get('DatabaseType') eq 'Oracle';
ok(exists $content->{$_}, "got $_") for @fields;

my $links = $content->{_hyperlinks};
Expand Down Expand Up @@ -260,7 +267,9 @@ my $freeform_cf_id;
is($content->{MaxValues}, 1);
is($content->{Disabled}, 0);

my @fields = qw(SortOrder Pattern Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
my @fields = qw(SortOrder Created Creator LastUpdated LastUpdatedBy UniqueValues EntryHint);
# Pattern is undef by default on Oralce and thus excluded from the response
push @fields, 'Pattern' unless RT->Config->Get('DatabaseType') eq 'Oracle';
ok(exists $content->{$_}, "got $_") for @fields;

my $links = $content->{_hyperlinks};
Expand Down

0 comments on commit ef2c3fb

Please sign in to comment.