diff options
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/metrics_worker_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/workers/metrics_worker_spec.rb b/spec/workers/metrics_worker_spec.rb index f5650494c7c..2acd0f8ba30 100644 --- a/spec/workers/metrics_worker_spec.rb +++ b/spec/workers/metrics_worker_spec.rb @@ -30,6 +30,14 @@ describe MetricsWorker do expect(metrics).to eq([{ values: {}, tags: { 'foo' => 'bar\\=' } }]) end + + it 'drops empty tags' do + metrics = worker.prepare_metrics([ + { 'values' => {}, 'tags' => { 'cats' => '', 'dogs' => nil }} + ]) + + expect(metrics).to eq([{ values: {}, tags: {} }]) + end end describe '#escape_value' do |