View | Details | Raw Unified | Return to bug 39970
Collapse All | Expand All

(-)a/t/db_dependent/api/v1/patrons.t (-2 / +14 lines)
Lines 926-932 subtest 'update() tests' => sub { Link Here
926
926
927
        subtest "extended_attributes tests" => sub {
927
        subtest "extended_attributes tests" => sub {
928
928
929
            plan tests => 26;
929
            plan tests => 29;
930
930
931
            my $attr_type_repeatable = $builder->build_object(
931
            my $attr_type_repeatable = $builder->build_object(
932
                {
932
                {
Lines 968-973 subtest 'update() tests' => sub { Link Here
968
                { type => $deleted_attr_code, value => 'potato' },
968
                { type => $deleted_attr_code, value => 'potato' },
969
            ];
969
            ];
970
970
971
            $t->post_ok(
972
                "//$userid:$password@/api/v1/patrons" => json => {
973
                    "firstname"   => "Katrina",
974
                    "surname"     => "Fischer",
975
                    "address"     => "Somewhere",
976
                    "category_id" => "ST",
977
                    "city"        => "Konstanz",
978
                    "library_id"  => "MPL"
979
                }
980
            )->status_is(400)
981
                ->json_is(
982
                '/error' => "Missing mandatory extended attribute (type=" . $attr_type_mandatory->code . ")" );
983
971
            $t->put_ok( "//$userid:$password@/api/v1/patrons/"
984
            $t->put_ok( "//$userid:$password@/api/v1/patrons/"
972
                    . $superlibrarian->borrowernumber => { 'x-koha-embed' => 'extended_attributes' } => json =>
985
                    . $superlibrarian->borrowernumber => { 'x-koha-embed' => 'extended_attributes' } => json =>
973
                    $newpatron )->status_is(400)
986
                    $newpatron )->status_is(400)
974
- 

Return to bug 39970