Skip to content

Commit

Permalink
a few more tests for text method
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 21, 2013
1 parent 00c420b commit 6be09e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changes
@@ -1,4 +1,6 @@

4.41 2013-09-22

4.40 2013-09-21
- Added text method to Mojo::Message.
- Added siblings method to Mojo::DOM.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -41,7 +41,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Top Hat';
our $VERSION = '4.40';
our $VERSION = '4.41';

sub AUTOLOAD {
my $self = shift;
Expand Down
5 changes: 5 additions & 0 deletions t/mojo/response.t
Expand Up @@ -7,6 +7,7 @@ use Mojo::Content::Single;
use Mojo::Content::MultiPart;
use Mojo::JSON;
use Mojo::Message::Response;
use Mojo::Util 'encode';

# Common status codes
my $res = Mojo::Message::Response->new;
Expand Down Expand Up @@ -934,6 +935,10 @@ is $res->body('hello!')->body, 'hello!', 'right content';
$res->content(Mojo::Content::MultiPart->new);
$res->body('hi!');
is $res->body, 'hi!', 'right content';
is $res->body(encode('UTF-8', ''))->text, encode('UTF-8', ''),
'right content';
$res->headers->content_type('text/plain;charset=UTF-8');
is $res->body(encode('UTF-8', ''))->text, '', 'right content';

# Body exceeding memory limit (no upgrade)
{
Expand Down

0 comments on commit 6be09e7

Please sign in to comment.