Skip to content

Commit

Permalink
Add changelog entry and fix 👮
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryTsepelev committed Nov 11, 2023
1 parent fbe40fe commit c5ab827
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -200,3 +202,4 @@
[@morgangrubb]: https://github.com/morgangrubb
[@mweitzel]: https://github.com/mweitzel
[@Supernich]: https://github.com/Supernich
[@agiveygives]: https://github.com/agiveygives
10 changes: 5 additions & 5 deletions spec/store_model/types/one_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c5ab827

Please sign in to comment.