Remove tests from FetchMimeType that just were setup to help Fedora pass.

This commit is contained in:
Colin Kuskie 2009-02-10 17:26:29 +00:00
parent 571c824ad1
commit 2482c0f89f

View file

@ -19,51 +19,30 @@ use Test::More; # increment this value for each test you create
my $session = WebGUI::Test->session; my $session = WebGUI::Test->session;
use LWP::MediaTypes;
my $recentModule = $LWP::MediaTypes::VERSION > 5.800;
my @testSets = ( my @testSets = (
{ {
input => 'webgui.txt', input => 'webgui.txt',
newput => 'text/plain', output => 'text/plain',
oldput => 'text/plain',
comment => q|text|, comment => q|text|,
}, },
{ {
input => 'plainblack.gif', input => 'plainblack.gif',
newput => 'image/gif', output => 'image/gif',
oldput => 'image/gif',
comment => q|gif|, comment => q|gif|,
}, },
{ {
input => 'background.jpg', input => 'background.jpg',
newput => 'image/jpeg', output => 'image/jpeg',
oldput => 'image/jpeg',
comment => q|jpeg|, comment => q|jpeg|,
}, },
{
input => 'colorPicker.js',
newput => 'application/x-javascript',
oldput => 'application/octet-stream',
comment => q|javascript|,
},
{
input => 'favIcon.ico',
newput => 'image/vnd.microsoft.icon',
oldput => 'application/octet-stream',
comment => q|octet-stream for unknown type|,
},
{ {
input => '', input => '',
newput => 'application/octet-stream', output => 'application/octet-stream',
oldput => 'application/octet-stream',
comment => q|Null path returns application/octet-stream|, comment => q|Null path returns application/octet-stream|,
}, },
{ {
input => undef, input => undef,
newput => undef, output => undef,
oldput => undef,
comment => q|Undef path returns undef|, comment => q|Undef path returns undef|,
}, },
); );
@ -86,8 +65,7 @@ foreach my $testSet (@testSets) {
? join '/', WebGUI::Test->root, 'www/extras', $testSet->{input} ? join '/', WebGUI::Test->root, 'www/extras', $testSet->{input}
: $testSet->{input}; : $testSet->{input};
my $output = WebGUI::Macro::FetchMimeType::process($session, $file); my $output = WebGUI::Macro::FetchMimeType::process($session, $file);
my $expected = $recentModule ? $testSet->{newput} : $testSet->{oldput}; is($output, $testSet->{output}, $testSet->{comment} );
is($output, $expected, $testSet->{comment} );
} }
} }