Lines 106-113
my $borrower = Koha::Borrower->new(
Link Here
|
106 |
guarantorid => '123454321', |
106 |
guarantorid => '123454321', |
107 |
borrowernotes => 'borrowernotes', |
107 |
borrowernotes => 'borrowernotes', |
108 |
relationship => 'myRelationship', |
108 |
relationship => 'myRelationship', |
109 |
ethnicity => undef, |
|
|
110 |
ethnotes => undef, |
111 |
sex => 'M', |
109 |
sex => 'M', |
112 |
password => 'hfkurhfe976634èj!', |
110 |
password => 'hfkurhfe976634èj!', |
113 |
flags => '55555', |
111 |
flags => '55555', |
Lines 132-138
my $borrower = Koha::Borrower->new(
Link Here
|
132 |
|
130 |
|
133 |
#borrower Accessor tests |
131 |
#borrower Accessor tests |
134 |
subtest 'Accessor tests' => sub { |
132 |
subtest 'Accessor tests' => sub { |
135 |
plan tests => 67; |
133 |
plan tests => 65; |
136 |
is( $borrower->borrowernumber, '12345', 'borrowernumber accessor returns correct value' ); |
134 |
is( $borrower->borrowernumber, '12345', 'borrowernumber accessor returns correct value' ); |
137 |
is( $borrower->cardnumber, '1234567890', 'cardnumber accessor returns correct value' ); |
135 |
is( $borrower->cardnumber, '1234567890', 'cardnumber accessor returns correct value' ); |
138 |
is( $borrower->surname, 'mySurname', 'surname accessor returns correct value' ); |
136 |
is( $borrower->surname, 'mySurname', 'surname accessor returns correct value' ); |
Lines 179-186
subtest 'Accessor tests' => sub {
Link Here
|
179 |
is( $borrower->guarantorid, '123454321', 'guarantorid accessor returns correct value' ); |
177 |
is( $borrower->guarantorid, '123454321', 'guarantorid accessor returns correct value' ); |
180 |
is( $borrower->borrowernotes, 'borrowernotes', 'borrowernotes accessor returns correct value' ); |
178 |
is( $borrower->borrowernotes, 'borrowernotes', 'borrowernotes accessor returns correct value' ); |
181 |
is( $borrower->relationship, 'myRelationship', 'relationship accessor returns correct value' ); |
179 |
is( $borrower->relationship, 'myRelationship', 'relationship accessor returns correct value' ); |
182 |
is( $borrower->ethnicity, undef, 'ethnicity accessor returns correct value' ); |
|
|
183 |
is( $borrower->ethnotes, undef, 'ethnotes accessor returns correct value' ); |
184 |
is( $borrower->sex, 'M', 'sex accessor returns correct value' ); |
180 |
is( $borrower->sex, 'M', 'sex accessor returns correct value' ); |
185 |
is( $borrower->password, 'hfkurhfe976634èj!', 'password accessor returns correct value' ); |
181 |
is( $borrower->password, 'hfkurhfe976634èj!', 'password accessor returns correct value' ); |
186 |
is( $borrower->flags, '55555', 'flags accessor returns correct value' ); |
182 |
is( $borrower->flags, '55555', 'flags accessor returns correct value' ); |
Lines 204-210
subtest 'Accessor tests' => sub {
Link Here
|
204 |
|
200 |
|
205 |
#borrower Set tests |
201 |
#borrower Set tests |
206 |
subtest 'Set tests' => sub { |
202 |
subtest 'Set tests' => sub { |
207 |
plan tests => 67; |
203 |
plan tests => 65; |
208 |
|
204 |
|
209 |
$borrower->set( |
205 |
$borrower->set( |
210 |
{ |
206 |
{ |
Lines 254-261
subtest 'Set tests' => sub {
Link Here
|
254 |
guarantorid => '223454321', |
250 |
guarantorid => '223454321', |
255 |
borrowernotes => 'Sborrowernotes', |
251 |
borrowernotes => 'Sborrowernotes', |
256 |
relationship => 'SmyRelationship', |
252 |
relationship => 'SmyRelationship', |
257 |
ethnicity => undef, |
|
|
258 |
ethnotes => undef, |
259 |
sex => 'F', |
253 |
sex => 'F', |
260 |
password => 'zerzerzer#', |
254 |
password => 'zerzerzer#', |
261 |
flags => '666666', |
255 |
flags => '666666', |
Lines 324-331
subtest 'Set tests' => sub {
Link Here
|
324 |
is( $borrower->guarantorid, '223454321', 'guarantorid field set ok' ); |
318 |
is( $borrower->guarantorid, '223454321', 'guarantorid field set ok' ); |
325 |
is( $borrower->borrowernotes, 'Sborrowernotes', 'borrowernotes field set ok' ); |
319 |
is( $borrower->borrowernotes, 'Sborrowernotes', 'borrowernotes field set ok' ); |
326 |
is( $borrower->relationship, 'SmyRelationship', 'relationship field set ok' ); |
320 |
is( $borrower->relationship, 'SmyRelationship', 'relationship field set ok' ); |
327 |
is( $borrower->ethnicity, undef, 'ethnicity field set ok' ); |
|
|
328 |
is( $borrower->ethnotes, undef, 'ethnotes field set ok' ); |
329 |
is( $borrower->sex, 'F', 'sex field set ok' ); |
321 |
is( $borrower->sex, 'F', 'sex field set ok' ); |
330 |
is( $borrower->password, 'zerzerzer#', 'password field set ok' ); |
322 |
is( $borrower->password, 'zerzerzer#', 'password field set ok' ); |
331 |
is( $borrower->flags, '666666', 'flags field set ok' ); |
323 |
is( $borrower->flags, '666666', 'flags field set ok' ); |