codebuddies / backend

CodeBuddies back-end
https://codebuddies.org
GNU General Public License v3.0
20 stars 25 forks source link

[Testing] Need to Add Specific Tests for Tagging Scenarios #72

Closed BethanyG closed 4 years ago

BethanyG commented 4 years ago

Currently, tags are being tested as a side effect of Resources. Given the issues we've already uncovered, we need to create specific tests for tagging and tag formatting that are pulled out into their own tag test files. We also need test data for these tests.

Not an exhaustive list, but here are some use cases we need to test for:

  1. Non-English extended ASCII characters as part of tags (see bug #71 )
  2. Unicode characters as part of tags
  3. "Special" characters (slashes, semicolons, anything that might read as code) as part of tags
  4. Nested JSON in tags
  5. Nested lists in tags
  6. Malformed or otherwise weirdly formatted tags
  7. Duplicate tags (to test de-duping)
  8. Various capitalization scenarios
  9. Adding tags to an existing set
  10. Removing tags from an existing set
BethanyG commented 4 years ago

Yes - the tags on the issue are weird. But it is both a bug we don't have tests, and and enhancement that we add all the scenarios.

lpatmo commented 4 years ago

👏 Great list. There's validation the front-end form can do of course, but would be good to validate if we're making API requests directly too. I have no idea how to implement testing against duplicate tags in DRF so this would be good learning for me...

BethanyG commented 4 years ago

Pulling this into a branch where I am working on multiple proposed changed to tags.