}
# Make that using content_type_stash_key, a valid value in the stash gets priority
+# this also tests that application-level config is properly passed to
+# individual controllers; see t/lib/Test/Catalyst/Action/REST.pm
{
my $req = $t->get(url =>
'/serialize/test_second?serialize_content_type=text/x-data-dumper'
use Catalyst::Runtime '5.70';
use Catalyst;
+use FindBin;
__PACKAGE__->config(
name => 'Test::Catalyst::Action::REST',
+ # RT#43840 -- this was ignored in 0.66 and earlier
+ 'Controller::Serialize' => {
+ content_type_stash_key => 'serialize_content_type',
+ },
);
__PACKAGE__->setup;
__PACKAGE__->config(
'default' => 'text/x-yaml',
'stash_key' => 'rest',
- 'content_type_stash_key' => 'serialize_content_type',
'map' => {
'text/x-yaml' => 'YAML',
'application/json' => 'JSON',
sub test_second :Local :ActionClass('Serialize') {
my ( $self, $c ) = @_;
+ # 'serialize_content_type' is configured in the test config in t/conf
$c->stash->{'serialize_content_type'} = $c->req->params->{'serialize_content_type'};
$c->stash->{'rest'} = {
lou => 'is my cat',