Skip to content

Commit

Permalink
[rails6][dialog_field_serializer_spec.rb] Fix spec
Browse files Browse the repository at this point in the history
For some (unknown) reason, this `.as_json` call to this object
stringifies all of it's nested keys, instead of the previous
implementation in Rails 5.2 where it didn't.

Unsure what changed with Rails 5.2 to Rails 6.0, and many hours were
wasted trying to determine what did, but since this change
hopefully should be minimally impacting, this has just been fixed in the
specs.
  • Loading branch information
NickLaMuro committed Nov 10, 2020
1 parent 81a71d2 commit 3cf996f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/models/dialog_field_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@
"resource_action" => "serialized resource action",
"dialog_field_responders" => dialog_field_responders,
"options" => {
:category_id => "123",
:category_name => "best category ever",
:category_description => "best category ever",
:force_single_value => true
"category_id" => "123",
"category_name" => "best category ever",
"category_description" => "best category ever",
"force_single_value" => true
},
"default_value" => "[\"one\", \"two\"]",
"values" => "values"
Expand Down

0 comments on commit 3cf996f

Please sign in to comment.