[Bug 7520] json script to return advanced search types
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7520 --- Comment #25 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 60539 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60539 bug_7520 Added Meta handler to API v1 for metadata lists Review of attachment 60539: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=7520&attachment=60539) ----------------------------------------------------------------- ::: Koha/REST/V1/Meta.pm @@ +12,5 @@
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Since this is new, please use https://wiki.koha-community.org/wiki/Coding_Guidelines#Licence ::: t/db_dependent/api/v1/meta.t @@ +12,5 @@
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Since this is new, please use https://wiki.koha-community.org/wiki/Coding_Guidelines#Licence @@ +32,5 @@
+my $builder = t::lib::TestBuilder->new(); + +my $dbh = C4::Context->dbh; +$dbh->{AutoCommit} = 0; +$dbh->{RaiseError} = 1;
This isn't necessary, since you can do it with the schema. No sense switching between DBI and DBIx ways of doing things. It gets ugly if they conflict. @@ +37,5 @@
+ +my $t = Test::Mojo->new('Koha::REST::V1'); + +my $categorycode = Koha::Database->new()->schema()->resultset('Category')->first()->categorycode(); +my $branchcode = Koha::Database->new()->schema()->resultset('Branch')->first()->branchcode();
my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); Then use $schema for the categorycode and branchcode. @@ +77,5 @@
+ ->json_has('/types/0/code') + ->json_has('/types/0/description') + ->json_has('/types/0/imageurl'); + +$dbh->rollback;
$schema->storage->txn_rollback(); -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org