diff --git a/include/sql/patch/upgrade165.sql b/include/sql/patch/upgrade165.sql index ac6022953..37940457a 100644 --- a/include/sql/patch/upgrade165.sql +++ b/include/sql/patch/upgrade165.sql @@ -160,7 +160,7 @@ LANGUAGE plpgsql; create trigger fiche_detail_check_trg before update or insert on - public.fiche_detail for each row execute function comptaproc.fiche_detail_check() ; + public.fiche_detail for each row execute procedure comptaproc.fiche_detail_check() ; insert into version (val,v_description) values (166,'Fix bug for card with empty name or quickcode'); diff --git a/unit-test/include/class/fiche.Test.php b/unit-test/include/class/fiche.Test.php index c46ecb390..77175bb73 100644 --- a/unit-test/include/class/fiche.Test.php +++ b/unit-test/include/class/fiche.Test.php @@ -453,7 +453,7 @@ where ); } /** - * @testdox Test if it is possible to insert or update a empty name + * @testdox Test if it is possible to insert an empty name * @dataProvider dataInsertName */ public function testInsertName($p_name,$p_result) @@ -465,6 +465,7 @@ where $fiche->insert(2, ['av_text23' => 'QC', "av_text1" => $p_name]); $fiche->load(); $this->assertEquals($p_result,$fiche->strAttribut(ATTR_DEF_NAME),'incorrect name'); + $fiche->remove(); } /**