Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-12-01 20:33:02 +0300
committerRobert Speicher <rspeicher@gmail.com>2017-12-20 00:45:08 +0300
commit8d0ad36bcfc0ef95ee9a116604ba1516367dbb27 (patch)
tree4ad2281ad83ead5df3ff1e3e6aaf7bdd25a67602 /spec
parent2f92238a6ea5550f94a4ece8453cbf6bdee1f77d (diff)
Add a JsonSerializationError class instead of raising SecurityError
Diffstat (limited to 'spec')
-rw-r--r--spec/models/concerns/blocks_json_serialization_spec.rb4
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