summaryrefslogtreecommitdiffstats
path: root/t/json-boxes.t
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-10-14 22:49:10 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-12-07 00:35:04 +0100
commit6c5fcdfbe3594b7311ab0bea417fc68f2eb9337d (patch)
treee1e990d2ca64a2ba7bfaba0d229e0ed2324e9765 /t/json-boxes.t
parentfba8176ed56c92410e972bbced00eb9183f68369 (diff)
downloadbugzilla-6c5fcdfbe3594b7311ab0bea417fc68f2eb9337d.tar.gz
bugzilla-6c5fcdfbe3594b7311ab0bea417fc68f2eb9337d.tar.xz
Revert "Bug 1495741 - memory issues: Avoid copying stuff in the webservice layer so much"harmony-master
Fix an "Unexpected Error" message when viewing a bug. This reverts commit 5688d0e712b85bc892ce405a1b79e3571f6d6d0f. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 't/json-boxes.t')
-rw-r--r--t/json-boxes.t36
1 files changed, 0 insertions, 36 deletions
diff --git a/t/json-boxes.t b/t/json-boxes.t
deleted file mode 100644
index 0fca3d997..000000000
--- a/t/json-boxes.t
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This Source Code Form is "Incompatible With Secondary Licenses", as
-# defined by the Mozilla Public License, v. 2.0.
-use strict;
-use warnings;
-use 5.10.1;
-use lib qw( . lib local/lib/perl5 );
-
-use Scalar::Util qw(weaken);
-use Mojo::JSON qw(encode_json);
-use Scalar::Util qw(refaddr);
-use Test2::V0;
-
-use ok 'Bugzilla::WebService::JSON';
-
-my $json = Bugzilla::WebService::JSON->new;
-my $ref = {foo => 1};
-is(refaddr $json->decode($json->encode($ref)), refaddr $ref);
-
-my $box = $json->encode($ref);
-
-is($json->decode(q[{"foo":1}]), {foo => 1});
-is($json->decode($box), {foo => 1});
-
-is "$box", $box->label;
-
-$box->encode;
-
-is encode_json([$box]), encode_json([encode_json($box->value)]);
-is "$box", q[{"foo":1}];
-
-done_testing;