diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-05-17 18:17:15 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-08-04 15:38:48 +0200 |
commit | 3598e60bf20b185b3f8d4e9a88a8eff39c8f729b (patch) | |
tree | ba84a7e7972d4a2563bb79485933fb78462868de /spec/helpers/storage_health_helper_spec.rb | |
parent | 990feb9f2b886c5bd0ac37339f149b8e80202019 (diff) | |
download | gitlab-ce-3598e60bf20b185b3f8d4e9a88a8eff39c8f729b.tar.gz |
Add a Circuitbreaker for storage paths
Diffstat (limited to 'spec/helpers/storage_health_helper_spec.rb')
-rw-r--r-- | spec/helpers/storage_health_helper_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/helpers/storage_health_helper_spec.rb b/spec/helpers/storage_health_helper_spec.rb new file mode 100644 index 00000000000..874498e6338 --- /dev/null +++ b/spec/helpers/storage_health_helper_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe StorageHealthHelper do + describe '#failing_storage_health_message' do + let(:health) do + Gitlab::Git::Storage::Health.new( + "<script>alert('storage name');)</script>", + [] + ) + end + + it 'escapes storage names' do + escaped_storage_name = '<script>alert('storage name');)</script>' + + result = helper.failing_storage_health_message(health) + + expect(result).to include(escaped_storage_name) + end + end +end |