summaryrefslogtreecommitdiff
path: root/spec/workers
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2015-12-14 16:52:05 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2015-12-17 17:25:48 +0100
commit5142c61707cc4169a3f8d9e378aacb8f88760db5 (patch)
treefabc862d6eb85dfb9b5ef586582053e3ce20ea04 /spec/workers
parent9f95ff0d90802467a04816f1d38e30770a026820 (diff)
downloadgitlab-ce-5142c61707cc4169a3f8d9e378aacb8f88760db5.tar.gz
Cast values to strings before escaping them
This ensures that e.g. line numbers used in tags are first casted to strings.
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/metrics_worker_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/workers/metrics_worker_spec.rb b/spec/workers/metrics_worker_spec.rb
index 0d12516c1a3..f5650494c7c 100644
--- a/spec/workers/metrics_worker_spec.rb
+++ b/spec/workers/metrics_worker_spec.rb
@@ -36,5 +36,9 @@ describe MetricsWorker do
it 'escapes an equals sign' do
expect(worker.escape_value('foo=')).to eq('foo\\=')
end
+
+ it 'casts values to Strings' do
+ expect(worker.escape_value(10)).to eq('10')
+ end
end
end