Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8
Conflicts: lib/WebGUI.pm lib/WebGUI/Auth/WebGUI.pm sbin/findBrokenAssets.pl sbin/testEnvironment.pl
This commit is contained in:
commit
677ac978b6
89 changed files with 1064 additions and 448 deletions
|
|
@ -8,6 +8,11 @@
|
|||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
# this test file is now slightly badly named since the functions in
|
||||
# WebGUI::Session::HTTML have all been migrated to
|
||||
# WebGUI::Session::Request and ::Response. still, these tests need
|
||||
# to continue to pass.
|
||||
|
||||
use strict;
|
||||
|
||||
use WebGUI::Test;
|
||||
|
|
@ -61,11 +66,22 @@ $response->status('200');
|
|||
|
||||
$http->setStreamedFile('');
|
||||
is($http->getStreamedFile, undef, 'set/get StreamedFile: false values return undef, empty string');
|
||||
$http->setStreamedFile(0);
|
||||
$http->setStreamedFile(undef);
|
||||
is($http->getStreamedFile, undef, 'set/get StreamedFile: false values return undef, empty string');
|
||||
|
||||
$http->setStreamedFile('/home/streaming');
|
||||
is($http->getStreamedFile, '/home/streaming', 'set/get StreamedFile: set specific location and get it');
|
||||
my $actual_file = $session->config->get('uploadsPath') . '/9e/a3/9ea37e148e517d4ae3d6326f691d848f/previous.gif'; # arbitrary file that exactually exists and hopefully will continue for a while
|
||||
$http->setStreamedFile( $actual_file );
|
||||
is($http->getStreamedFile, $actual_file, 'set/get StreamedFile: set specific location and get it');
|
||||
|
||||
do {
|
||||
eval {
|
||||
$http->setStreamedFile( $actual_file . '_but_actually_not_an_actual_file_because_someone_appended_a_bunch_of_bloody_garbage_to_it' );
|
||||
};
|
||||
my $e = WebGUI::Error->caught("WebGUI::Error::InvalidFile");
|
||||
my $errorMessage = $e->error;
|
||||
ok($errorMessage =~ m/No such file or directory/, "set/get StreamedFile: setting a non-existant file blows stuff up but that's okay because it's handled gracefully" );
|
||||
};
|
||||
|
||||
$http->setStreamedFile('');
|
||||
|
||||
####################################################
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ $session->setting->set('userFunctionStyleId', $templates->{user}->getId);
|
|||
|
||||
is($style->userStyle('userStyle'), 'USER PRINTABLE STYLE TEMPLATE:userStyle',
|
||||
'userStyle returns templated output according to userFunctionStyleId in settings');
|
||||
is($session->http->{_http}{cacheControl}, 'none', 'userStyle(via process): HTTP cacheControl set to none to prevent proxying');
|
||||
is($session->http->getCacheControl, 'none', 'userStyle(via process): HTTP cacheControl set to none to prevent proxying');
|
||||
|
||||
is($style->userStyle('userStyle'), 'USER PRINTABLE STYLE TEMPLATE:userStyle',
|
||||
'userStyle returns templated output according to userFunctionStyleId in settings');
|
||||
|
|
@ -306,8 +306,7 @@ $head =~ s/(^HEAD=.+$)/$1/s;
|
|||
cmp_bag(\@metas, $expectedMetas, 'process:default meta tags with no caching head tags, preventProxyCache setting');
|
||||
$session->setting->set('preventProxyCache', $origPreventProxyCache);
|
||||
|
||||
##No accessor
|
||||
is($session->http->{_http}{cacheControl}, 'none', 'process: HTTP cacheControl set to none to prevent proxying');
|
||||
is($session->http->getCacheControl, 'none', 'process: HTTP cacheControl set to none to prevent proxying');
|
||||
|
||||
####################################################
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue