Explore general approach for alert showing logic specs
The following discussion from !149329 (merged) should be addressed:
-
@dstull started a discussion: thought (non-blocking):
I feel we are stretching here just a bit in use of conditionals in this test. I know we copied from another area...but it is verging on making me a bit uncomfortable with the general approach.
Perhaps in a follow-up we can explore better ways to handle this spec while still maintaining conciseness in the spec somehow.
Specific problem area: https://gitlab.com/gitlab-org/gitlab/-/blob/71587bb2f88a0cb20f63fb80a6cec149a90fd2ca/ee/spec/helpers/ee/users/callouts_helper_spec.rb#L352
It's preferable to have expected_results
predefined in the table like here: https://gitlab.com/gitlab-org/gitlab/-/blob/71587bb2f88a0cb20f63fb80a6cec149a90fd2ca/ee/spec/helpers/ee/users/callouts_helper_spec.rb#L253