Skip to content

Commit

Permalink
Restore test for enum not existing when value is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
lewispb committed Aug 2, 2023
1 parent b29a895 commit 5c5ee24
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/types/enum_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class EnumTest < ActiveSupport::TestCase
end

test "exists?" do
assert @enum.exists?
enum = Kredis.enum "numbers", values: %w[ one two three ], default: nil
assert_not enum.exists?

enum.value = "one"
assert enum.exists?
end
end

0 comments on commit 5c5ee24

Please sign in to comment.