Subject: | Select value |
Not sure if this is me or the POD:
CODE:
use strict;
use warnings;
use Test::More;
BEGIN {
use_ok('Form::Sensible');
}
use Form::Sensible::Field::Select;
my $select_field = Form::Sensible::Field::Select->new(
name => 'bread_type',
accepts_multiple => 1
);
$select_field->add_option('wheat', 'Wheat Bread');
$select_field->add_option('white', 'White Bread');
$select_field->add_option('sour', 'Sourdough Bread');
$select_field->value('wheat');
isa_ok( $select_field->value, 'ARRAY' );
done_testing();
OUTPUTS:
ok 1 - use Form::Sensible;
not ok 2 - The class isa ARRAY
# Failed test 'The class isa ARRAY'
# at t/bug.pl line 24.
# The class isn't a 'ARRAY' it's a ''
1..2