diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1462a..07e3d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ## master +- [PR #161](https://github.com/DmitryTsepelev/store_model/pull/161) Addresses error deserializing malformed json string ([@agiveygives]) + ## 2.1.2 (2023-10-07) - [PR #156](https://github.com/DmitryTsepelev/store_model/pull/156) Override of accepts_nested_attributes_for breaks app start when connection to db is not available ([@Supernich]) @@ -200,3 +202,4 @@ [@morgangrubb]: https://github.com/morgangrubb [@mweitzel]: https://github.com/mweitzel [@Supernich]: https://github.com/Supernich +[@agiveygives]: https://github.com/agiveygives diff --git a/spec/store_model/types/one_spec.rb b/spec/store_model/types/one_spec.rb index 48fb796..82ae9a5 100644 --- a/spec/store_model/types/one_spec.rb +++ b/spec/store_model/types/one_spec.rb @@ -201,25 +201,25 @@ end end - describe '#deserialize' do - describe 'when an empty string is passed' do + describe "#deserialize" do + describe "when an empty string is passed" do let(:value) { "" } subject { type.deserialize(value) } it { is_expected.to be_a(Configuration) } - it('is equal to an empty model') { is_expected.to eq(Configuration.new) } + it("is equal to an empty model") { is_expected.to eq(Configuration.new) } end - describe 'when a malformed JSON string is passed' do + describe "when a malformed JSON string is passed" do let(:value) { "{/sdfgsdfre}" } subject { type.deserialize(value) } it { is_expected.to be_a(Configuration) } - it('is equal to an empty model') { is_expected.to eq(Configuration.new) } + it("is equal to an empty model") { is_expected.to eq(Configuration.new) } end end end