@@ -, +, @@ prove t/db_dependent/Koha/Objects.t --- Koha/Objects.pm | 2 +- t/db_dependent/Koha/Objects.t | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) --- a/Koha/Objects.pm +++ a/Koha/Objects.pm @@ -323,7 +323,7 @@ Currently count, pager, update and delete are covered. sub AUTOLOAD { my ( $self, @params ) = @_; - my @known_methods = qw( count pager update delete result_class single ); + my @known_methods = qw( count pager update delete result_class single get_column ); my $method = our $AUTOLOAD; $method =~ s/.*:://; --- a/t/db_dependent/Koha/Objects.t +++ a/t/db_dependent/Koha/Objects.t @@ -19,7 +19,7 @@ use Modern::Perl; -use Test::More tests => 11; +use Test::More tests => 12; use Test::Warn; use Koha::Authority::Types; @@ -127,6 +127,13 @@ subtest 'single' => sub { "Warning is presented if single is used for a result with multiple rows."; }; +subtest 'get_column' => sub { + plan tests => 1; + my @cities = Koha::Cities->search; + my @city_names = map { $_->city_name } @cities; + is_deeply( [ Koha::Cities->search->get_column('city_name')->all ], \@city_names, 'Koha::Objects->get_column should be allowed' ); +}; + subtest 'Exceptions' => sub { plan tests => 2; --