Refactor out synopsis code from Post to make a new AssetAspect. Have the WikiPage start using it, and assigning synopses to pages.

This commit is contained in:
Colin Kuskie 2010-04-21 18:24:30 -07:00
parent 5ee5c910d8
commit 79fea5bb76
5 changed files with 117 additions and 76 deletions

View file

@ -19,7 +19,7 @@ use strict;
use lib "$FindBin::Bin/../lib";
use WebGUI::Test;
use WebGUI::Session;
use Test::More tests => 16; # increment this value for each test you create
use Test::More tests => 17; # increment this value for each test you create
use WebGUI::Asset::Wobject::Collaboration;
use WebGUI::Asset::Post;
use WebGUI::Asset::Post::Thread;
@ -113,6 +113,7 @@ ok($post->canEdit(), "User in groupIdEditUserGroup group can edit post after the
#
######################################################################
can_ok($post, 'getSynopsisAndContent');
my ($synopsis, $content) = $post->getSynopsisAndContent('', q|Brandheiße Neuigkeiten rund um's Klettern für euch aus der Region |);
is($synopsis, q|Brandheiße Neuigkeiten rund um's Klettern für euch aus der Region |, 'getSynopsisAndContent: UTF8 characters okay');

View file

@ -16,7 +16,7 @@ use lib "$FindBin::Bin/../lib";
use WebGUI::Test;
use WebGUI::Session;
use Test::More tests => 17; # increment this value for each test you create
use Test::More tests => 18; # increment this value for each test you create
use Test::Deep;
use WebGUI::Asset::Wobject::WikiMaster;
use WebGUI::Asset::WikiPage;
@ -91,3 +91,4 @@ $comments = $wikipage->get('comments');
is($comments->[0]{comment}, $secondComment, "you can delete a comment");
is($wikipage->get('averageCommentRating'), 1, 'average rating is adjusted after deleting a comment');
can_ok($wikipage, 'getSynopsisAndContent');