Skip to content

Commit

Permalink
Merge pull request #10915 from jntullo/service_dialog_options
Browse files Browse the repository at this point in the history
Fix service_dialog update
  • Loading branch information
chriskacerguis committed Aug 31, 2016
2 parents 97d54c6 + 3eb2f6b commit 10c5b9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/base_controller/blueprints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def service_catalog_options(bundle)
end

def service_dialog_options(bundle)
Dialog.find(parse_id(bundle["service_dialog"], :service_dialogs)) if bundle["service_catalog"]
Dialog.find(parse_id(bundle["service_dialog"], :service_dialogs)) if bundle["service_dialog"]
end
end
end
Expand Down
9 changes: 8 additions & 1 deletion spec/requests/api/blueprints_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
blueprint = FactoryGirl.create(:blueprint)
original_service_template = FactoryGirl.create(:service_template)
original_service_catalog = FactoryGirl.create(:service_template_catalog)
service_dialog = FactoryGirl.create(:dialog_with_tab_and_group_and_field)
blueprint.create_bundle(:service_templates => [original_service_template],
:service_catalog => original_service_catalog)
api_basic_authorize action_identifier(:blueprints, :edit)
Expand All @@ -328,6 +329,9 @@
:action => "edit",
:resource => {
:bundle => {
:service_dialog => {
:id => service_dialog.id
},
:service_catalog => nil
}
}
Expand All @@ -351,7 +355,10 @@
:action => "edit",
:resource => {
:bundle => {
:service_dialog => nil
:service_catalog => {
:id => original_service_catalog.id
},
:service_dialog => nil
}
}
)
Expand Down

0 comments on commit 10c5b9d

Please sign in to comment.