Oliver Günther
2026-04-20 10:12:41 +02:00
parent d4bb780b6d
commit 15568e150e
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class CustomActions::Actions::Base
end
def value_objects
values.map do |value|
values.filter_map do |value|
allowed_values.find { |v| v[:value] == value }
end
end
@@ -140,6 +140,15 @@ RSpec.shared_examples_for "associated custom action" do
end
end
describe "#value_objects" do
it "does not include nil for values not present in allowed_values" do
instance.values = [""]
expect(instance.value_objects)
.not_to include(nil)
end
end
it_behaves_like "associated custom action validations"
end
end