Skip to content

Commit

Permalink
Item11456: Make ResponseTests cope w/trunk & 1.1
Browse files Browse the repository at this point in the history
Conflicts:

	test/unit/ResponseTests.pm

git-svn-id: http://svn.foswiki.org/trunk@13735 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jan 19, 2012
1 parent 83f2660 commit 9a26a72
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions UnitTestContrib/test/unit/ResponseTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ResponseTests;
use strict;
use warnings;

use Unit::TestCase;
our @ISA = qw( Unit::TestCase );
use FoswikiTestCase();
our @ISA = qw( FoswikiTestCase );
use Assert;

use Foswiki::Response;
Expand Down Expand Up @@ -43,9 +43,15 @@ sub test_empty_new {

$this->assert_null( $res->status, 'Non-empty initial status' ) if not DEBUG;
$this->assert_null( $res->body, 'Non-empty initial body' );
$this->assert_matches( $Foswiki::cfg{Site}{CharSet} || 'iso-8859-1',
$res->charset,
'Bad default initial charset: ' . ( $res->charset || 'undef' ) );
if ( $this->check_dependency('Foswiki,>=,1.2') ) {
$this->assert_matches( $Foswiki::cfg{Site}{CharSet} || 'iso-8859-1',
$res->charset,
'Bad default initial charset: ' . ( $res->charset || 'undef' ) );
}
else {
$this->assert_matches( 'ISO-8859-1', $res->charset,
'Bad default initial charset: ' . ( $res->charset || 'undef' ) );
}

my @cookies = $res->cookies();
$this->assert_str_equals( 0, scalar @cookies, '$res->cookies not empty' );
Expand Down

0 comments on commit 9a26a72

Please sign in to comment.