Band-aid fix for bad decache of icalFeeds, where it is not deserialized from JSON. Fixes bug #12139.
This commit is contained in:
parent
444c006aae
commit
c3652d12a9
3 changed files with 21 additions and 5 deletions
|
|
@ -57,7 +57,7 @@ use Data::Dumper;
|
|||
use WebGUI::Asset::Wobject::Calendar;
|
||||
use WebGUI::Asset::Event;
|
||||
|
||||
plan tests => 12 + scalar @icalWrapTests;
|
||||
plan tests => 15 + scalar @icalWrapTests;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
|
|
@ -302,8 +302,6 @@ addToCleanup($tag2);
|
|||
|
||||
is(scalar @{ $windowCal->getLineage(['children'])}, 17, 'added events to the window calendar');
|
||||
|
||||
diag "startDate: ". $windowStart->toDatabase;
|
||||
diag "endDate: ". $windowEnd->toDatabase;
|
||||
my @window = $windowCal->getEventsIn($windowStart->toDatabase, $windowEnd->toDatabase);
|
||||
|
||||
cmp_bag(
|
||||
|
|
@ -595,3 +593,16 @@ cmp_deeply(
|
|||
[],
|
||||
'getFeeds: returns an empty array ref with no feeds'
|
||||
);
|
||||
|
||||
##Update with JSON and try again :)
|
||||
$feedCal->update({icalFeeds => '[]'});
|
||||
is_deeply $feedCal->get('icalFeeds'), [], 'set as JSON, returned perl';
|
||||
|
||||
$feedCal->{_properties}->{icalFeeds} = '[]';
|
||||
is $feedCal->get('icalFeeds'), '[]', 'poked into the object directly, returned as JSON';
|
||||
|
||||
cmp_deeply(
|
||||
$feedCal->getFeeds(),
|
||||
[],
|
||||
'but getFeeds still returns a data structure.'
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue