I want smart proxy features to also have some capabilities by default. So I modified:
+++ b/test/factories/smart_proxy.rb @@ -27,7 +27,7 @@ FactoryBot.define do factory :dhcp_smart_proxy do after(:build) do |smart_proxy, _evaluator| - smart_proxy.smart_proxy_features << FactoryBot.build(:smart_proxy_feature, :dhcp, :smart_proxy => smart_proxy) + smart_proxy.smart_proxy_features << FactoryBot.build(:smart_proxy_feature, :dhcp, :smart_proxy => smart_proxy, :capabilities => ["dhcp_filename_ipv4"]) end end
It looked like pretty straightforward change, however it does not work. I can’t find the culprit. In the
dhcp_test.rb it does not work:
FactoryBot.build(:subnet_ipv4, :dhcp).dhcp.capabilities("DHCP") 
I am not getting this, Subnet (
subnet_ipv4) factory should pick
association :dhcp, :factory => :dhcp_smart_proxy association and I have added the new attribute there, yet I don’t see it.