Fix milestone translatable specs

Milestones do not have an author so we can not update that attribute.

Adding this conditional fixes this spec: ./spec/features/admin/budget_investment_milestones_spec.rb[1:1:1:10]
This commit is contained in:
voodoorai2000
2019-06-18 19:44:28 +02:00
parent 251326ea9a
commit 83b43c6bc6

View File

@@ -49,7 +49,7 @@ shared_examples "edit_translatable" do |factory_name, path_name, input_fields, t
if front_end_path_to_visit?(path_name)
Setting["feature.translation_interface"] = true
translatable.update(author: user)
translatable.update(author: user) if translatable.respond_to?(:author)
end
end