Revision c46898c7
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
t/helper/csv.t | ||
---|---|---|
125 | 125 |
); |
126 | 126 |
is $csv->parse, undef, 'broken csv content won\'t get parsed'; |
127 | 127 |
is_deeply $csv->errors, [ '"Kaf"fee";;0.12;1,221.52'."\n", 2023, 'EIQ - QUO character not allowed', 5, 2 ], 'error'; |
128 |
isa_ok( ($csv->errors)[0], 'SL::Helper::Csv::Error', 'Errors get objectified'); |
|
128 | 129 |
|
129 | 130 |
#### |
130 | 131 |
|
... | ... | |
222 | 223 |
); |
223 | 224 |
is $csv->parse, undef, 'wrong profile gets rejected'; |
224 | 225 |
is_deeply $csv->errors, [ 'buchungsgruppen.1.description', undef, "Profile path error. Indexed relationship is not OneToMany around here: 'buchungsgruppen.1'", undef ,0 ], 'error indicates wrong header'; |
226 |
isa_ok( ($csv->errors)[0], 'SL::Helper::Csv::Error', 'Errors get objectified'); |
|
225 | 227 |
|
226 | 228 |
# vim: ft=perl |
Auch abrufbar als: Unified diff
Csv Errors sind nun Objekte mit entsprechendem Zugriff.