Skip to content

Commit

Permalink
Merge pull request #17917 from bdunne/fix_the_api_specs_after_17802
Browse files Browse the repository at this point in the history
Ensure options is always a hash
  • Loading branch information
gmcculloug authored Aug 28, 2018
2 parents 5f129ad + 41fb53c commit 64f9089
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/custom_button.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CustomButton < ApplicationRecord
has_one :resource_action, :as => :resource, :dependent => :destroy, :autosave => true

serialize :options
serialize :options, Hash
serialize :visibility_expression
serialize :enablement_expression
serialize :visibility
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/task_helpers/exports/custom_buttons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"description" => "Export Test",
"applies_to_class" => "Vm",
"visibility_expression" => nil,
"options" => nil,
"options" => {},
"userid" => nil,
"wait_for_complete" => nil,
"name" => "export_test_button",
Expand All @@ -44,7 +44,7 @@
"description" => "Export Test",
"applies_to_class" => "Service",
"visibility_expression" => nil,
"options" => nil,
"options" => {},
"userid" => nil,
"wait_for_complete" => nil,
"name" => "export_test_button2",
Expand Down
2 changes: 1 addition & 1 deletion spec/models/custom_button_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"disabled_text" => nil,
"enablement_expression" => nil,
"applies_to_class" => nil,
"options" => nil,
"options" => {},
"userid" => nil,
"wait_for_complete" => nil,
"created_on" => nil,
Expand Down

0 comments on commit 64f9089

Please sign in to comment.