-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
add have_encrypt_attribute_matcher to test usage of the encrypts macro #1581
add have_encrypt_attribute_matcher to test usage of the encrypts macro #1581
Conversation
a88efb0
to
b26e742
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution! I left some comments, please let me know if I can help you with anything to move this PR forward. There are also some linting issues. You can check them here.
Once again, thank you for contributing.
lib/shoulda/matchers/active_record/have_encrypt_attribute_matcher.rb
Outdated
Show resolved
Hide resolved
lib/shoulda/matchers/active_record/have_encrypt_attribute_matcher.rb
Outdated
Show resolved
Hide resolved
lib/shoulda/matchers/active_record/have_encrypt_attribute_matcher.rb
Outdated
Show resolved
Hide resolved
lib/shoulda/matchers/active_record/have_encrypt_attribute_matcher.rb
Outdated
Show resolved
Hide resolved
spec/unit/shoulda/matchers/active_record/have_encrypt_attributes_matcher_spec.rb
Outdated
Show resolved
Hide resolved
spec/unit/shoulda/matchers/active_record/have_encrypt_attributes_matcher_spec.rb
Outdated
Show resolved
Hide resolved
12821b7
to
4e686dc
Compare
This would be a great addition. May I suggest a name change? |
After a second look, this new method/matcher is quite similar to the |
@theforestvn88 I think it would be better to name this method as |
Sorry for taking so long to respond. I agree. I think your suggestion it's a good idea. |
At the first time i use Anyway, i just want to know that in this case what will we should use: |
Good question! |
I'm fine either way. Let's use |
e8e58a0
to
17ff2c3
Compare
6762f8b
to
68abf8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Since Rails 7.0, Active Record supports application-level encryption.
So i think it would be nice to have a matcher that help to test usage of the
encrypts
macro: