Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextCSV field type appears to be broken? #126

Open
karenetheridge opened this issue Oct 17, 2016 · 2 comments
Open

TextCSV field type appears to be broken? #126

karenetheridge opened this issue Oct 17, 2016 · 2 comments

Comments

@karenetheridge
Copy link
Contributor

karenetheridge commented Oct 17, 2016

Changing t/fields/textcsv.t thusly:

-$form->process( init_object => $init_obj );
+ok($form->process( init_object => $init_obj ), 'form processed without errors');

-$form->process( $params );
+ok($form->process( $params ), 'form processed without errors');

results in test output:

ok 1
not ok 2 - form processed without errors
#   Failed test 'form processed without errors'
#   at t/fields/textcsv.t line 20.
ok 3 - fif is correct
ok 4 - rendering worked
ok 5 - form processed without errors
ok 6 - fif ok
ok 7 - right value
ok 8 - rendering worked
1..8
# Looks like you failed 1 test of 8.

Field inflation/deflation is really confusing, so I'm not sure what is going
wrong here -- and I'm not sure what TextCSV is expecting as an input value
when called as $form->process(init_obj => ...) vs $form->process($hash) --
does it want a string or a listref? I'm having difficulty getting anything
to validate.

@gshank
Copy link
Owner

gshank commented Oct 18, 2016

That failure is because $form->process doesn’t return a positive result
($form->validated) when validation hasn’t been run, i.e. there are no
params.

On Mon, Oct 17, 2016 at 6:39 PM, Karen Etheridge [email protected]
wrote:

Changing t/fields/textcsv.t thusly:

-$form->process( init_object => $init_obj );
+ok($form->process( init_object => $init_obj ), 'form processed without errors');

-$form->process( $params );
+ok($form->process( $params ), 'form processed without errors');

results in test output:

ok 1
not ok 2 - form processed without errors

Failed test 'form processed without errors'

at t/fields/textcsv.t line 20.

ok 3 - fif is correct
ok 4 - rendering worked
ok 5 - form processed without errors
ok 6 - fif ok
ok 7 - right value
ok 8 - rendering worked
1..8

Looks like you failed 1 test of 8.

Field inflation/deflation is really confusing, so I'm not sure what is
going
wrong here -- and I'm not sure what TextCSV is expecting as an input value
when called as $form->process(init_obj => ...) vs$form->process($hash)` --
does it want a string or a listref? I'm having difficulty getting
anything
to validate.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#126, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AACUoxeqWeOCzuTuxb70JieqUEN_NsCiks5q0_kxgaJpZM4KZMBi
.

@karenetheridge
Copy link
Contributor Author

karenetheridge commented Oct 19, 2016

ah, ok, I was thinking validation would happen with init_object as well, but that makes sense.

If I just wrap the $form->process( $params ); call on line 29 with an ok, that test also fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants