Closed emerson-silva-repassa closed 3 years ago
Hey, @emerson-silva-repassa . I didn't find it very meaningful to add helpers for testing enums, but I'd definetly welcome a PR.
We do the following in our project:
RSpec.describe Queries::Question::Order::EnumType do
it 'enumerizes the correct values' do
expect(described_class.values.keys)
.to match_array(%w(CREATED_AT BOOKMARKED ANSWERED_AT LIKES_COUNT))
end
end
Let me know if I can help you with anything else.
How to test Enum values? I didn't find anything about it.