diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-12-01 11:33:02 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-12-19 15:45:08 -0600 |
commit | 8d0ad36bcfc0ef95ee9a116604ba1516367dbb27 (patch) | |
tree | 4ad2281ad83ead5df3ff1e3e6aaf7bdd25a67602 /spec | |
parent | 2f92238a6ea5550f94a4ece8453cbf6bdee1f77d (diff) | |
download | gitlab-ce-8d0ad36bcfc0ef95ee9a116604ba1516367dbb27.tar.gz |
Add a JsonSerializationError class instead of raising SecurityError
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/concerns/blocks_json_serialization_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/concerns/blocks_json_serialization_spec.rb b/spec/models/concerns/blocks_json_serialization_spec.rb index 84f8ccc238e..571ed7d5b26 100644 --- a/spec/models/concerns/blocks_json_serialization_spec.rb +++ b/spec/models/concerns/blocks_json_serialization_spec.rb @@ -7,11 +7,11 @@ describe BlocksJsonSerialization do it 'blocks as_json' do expect { DummyModel.new.to_json } - .to raise_error(SecurityError, "JSON serialization has been disabled on DummyModel") + .to raise_error(described_class::JsonSerializationError, /DummyModel/) end it 'blocks to_json' do expect { DummyModel.new.to_json } - .to raise_error(SecurityError, "JSON serialization has been disabled on DummyModel") + .to raise_error(described_class::JsonSerializationError, /DummyModel/) end end |