From 3d3f90009139d75fa1139aeb7eb755d31c360c83 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Wed, 8 Jun 2022 21:07:46 -0700 Subject: [PATCH] starting a test --- Open-ILS/src/perlmods/live_t/31-courses.t | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/live_t/31-courses.t b/Open-ILS/src/perlmods/live_t/31-courses.t index 8c3c5172c1..e7a78329d4 100644 --- a/Open-ILS/src/perlmods/live_t/31-courses.t +++ b/Open-ILS/src/perlmods/live_t/31-courses.t @@ -1,7 +1,7 @@ #!perl use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 5; # TODO add the right number of tests use OpenILS::Utils::TestUtils; use OpenILS::Utils::CStoreEditor qw/:funcs/; use OpenILS::Application::AppUtils; @@ -80,3 +80,25 @@ $results = $e->search_biblio_record_entry({tcn_source=>$temp_tcn_source,deleted= is(scalar(@$results), 0, 'Successfully deleted bre'); +# -------------------------------------------------------------------------- +# 3. Let's attach an existing item record entry to course #1, then delete it +# -------------------------------------------------------------------------- + +my $acmcm = Fieldmapper::asset::course_module_course_materials->new; +$acmcm->course(1); +$acmcm->id(9999); +$acmcm->record(55); +$acmcm->item(); # TODO add a value +$acmcm->original_status(); # TODO add a status +$acmcm->original_location(); # TODO add a location +$acmcm->temporary_record(0); +$e->create_asset_course_module_course_materials( $acmcm ); # associated this bib record with a course +$e->commit; + +$apputils->simplereq('open-ils.courses', 'open-ils.courses.detach_material', $authtoken, 9999); + +my $results = $e->search_asset_course_module_course_materials({id => 9999}); #TODO fetch the acp +is(scalar(@$results), 0, 'Successfully deleted acmcm'); #TODO check the acp status and location + + + -- 2.11.0