Allow to create an investment with a geolocation.
In the Management section when creating an investment we were not passing the map attributes, so we were never able to associate a geolocation.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class Management::Budgets::InvestmentsController < Management::BaseController
|
||||
include Translatable
|
||||
include MapLocationAttributes
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
@@ -57,7 +58,8 @@ class Management::Budgets::InvestmentsController < Management::BaseController
|
||||
end
|
||||
|
||||
def investment_params
|
||||
attributes = [:external_url, :heading_id, :tag_list, :organization_name, :location, :skip_map]
|
||||
attributes = [:external_url, :heading_id, :tag_list, :organization_name, :location, :skip_map,
|
||||
map_location_attributes: map_location_attributes]
|
||||
params.require(:budget_investment).permit(attributes, translation_params(Budget::Investment))
|
||||
end
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
|
||||
find("#new_map_location").click
|
||||
send("submit_#{mappable_factory_name}_form")
|
||||
|
||||
expect(page).to have_css(".map_location")
|
||||
within ".map_location" do
|
||||
expect(page).to have_css(".map-icon")
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Can not display map on #{mappable_factory_name} when not fill marker on map" do
|
||||
|
||||
Reference in New Issue
Block a user