From 5c5ee241e8004a99545ede50f23c81e6aa3f70bb Mon Sep 17 00:00:00 2001 From: Lewis Buckley Date: Wed, 2 Aug 2023 12:33:28 +0100 Subject: [PATCH] Restore test for enum not existing when value is nil --- test/types/enum_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/types/enum_test.rb b/test/types/enum_test.rb index eecdd0e..6cac20e 100644 --- a/test/types/enum_test.rb +++ b/test/types/enum_test.rb @@ -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