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

delete_with_limit_spec.rb « concerns « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0259a1ea4fb4fc3706f2bbccf738508a351a7b9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe DeleteWithLimit do
  describe '.delete_with_limit' do
    it 'deletes a limited amount of rows' do
      create_list(:web_hook_log, 4)

      expect do
        WebHookLog.delete_with_limit(2)
      end.to change { WebHookLog.count }.by(-2)
    end
  end
end