shoulda-matchers
shoulda-matchers copied to clipboard
Add support for text columns for secure matchers
Issue
Currently, using the text
datatype for the has_secure_token
functionality is supported in Rails, but when used alongside shoulda-matchers it fails as the datatype must be string
.
On codebases that use postgresql, there's no difference between using text
or string
and in most cases it makes sense to use text
.
Proposed solution
Add support for text
datatypes when using the have_secure_token
matcher.
I'm really struggling to get appraisals working to run the specs locally so I'm not convinced this works yet. 😢
Mind if I copy this PR with the requested changes so we can get this merged in?
@krainboltgreene, sorry for the delayed response. I wasn't following this PR.
I'd say to feel free to copy this PR with the requested changes just make sure to also give credits to @maxehmookau