summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/lib/gitlab/memory/watchdog/monitor_result_shared_examples.rb
blob: 98c0e7d506b751610ef1383d8e169019a70efead (plain)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

RSpec.shared_examples 'returns Watchdog Monitor result' do |threshold_violated:|
  it 'returns if threshold is violated and payload' do
    result = monitor.call

    expect(result[:threshold_violated]).to eq(threshold_violated)
    expect(result[:payload]).to eq(payload)
  end
end