Protected branches EE tests don't need to_sym and send
In spec/features/protected_tags/access_control_ee_spec.rb
and the equivalent file for branches we have
`roles.each { |(access_type_id, _)| expect(ProtectedTag.last.send("create_access_levels".to_sym).map(&:access_level)).to include(access_type_id) }`
The following discussion from !1629 (merged) should be addressed:
-
@rdavila started a discussion: (+2 comments) We can use a symbol directly here:
:create_access_levels
, also looks like we don't need to usesend
since that method is public. I think we can refactor these specs with something like:access_type_ids = ProtectedTag.last.create_access_levels.map(&:access_level) user_ids = ... roles.each { |(access_type_id, _)| expect(access_type_ids).to include(access_type_id) } ...
Edited by James EJ