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

(NFC) Comment clarification in test class #17133

Merged
merged 1 commit into from
Apr 22, 2020
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

I just updated the comments on this helper to clarify the limitations of the function & the
fact that it should not be our only way to test thousand separators.

Before

Our main function for ensuring forms are passing values through clean money is marked as deprecated

After

Deprecation marker removed. Comments added to note the limitations of this function and that we also need to have some testing to ensure the clean function handles other currencies.

Technical Details

I was noticing perfect was becoming the enemy of the good here. The function was marked as deprecated because it doesn't cover all scenarios - but the upshot was that we stopped increasing out thousand separator testing.

In fact we need lots of form tests to do some testing of the separators and a very small number to test more variants - this latter has been added
& the comments point to the need for more without going as far as deprecating

Comments

@jaapjansma FYI

I just updated the comments on this helper to clarify the limitations of the function & the
fact that it should not be our only way to test thousand separators.

I was noticing perfect was becoming the enemy of the good here. The function was marked as deprecated
because it doesn't cover all scenarios - but the upshot was that we stopped increasing out
thousand separator testing. In fact we need lots of form tests to do some testing of
the separators and a very small number to test more variants - this latter has been added
& the comments point to the need for more without going as far as deprecating
@civibot
Copy link

civibot bot commented Apr 21, 2020

(Standard links)

@civibot civibot bot added the master label Apr 21, 2020
@jaapjansma
Copy link
Contributor

nice

@totten totten changed the title Comment clarification in test class (NFC) Comment clarification in test class Apr 22, 2020
@totten
Copy link
Member

totten commented Apr 22, 2020

It's basically NFC and @jaapjansma agrees with it, so merging.

@totten totten merged commit 2208671 into civicrm:master Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants