2020-02-03 04:08:42 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe DeleteWithLimit do
|
2020-02-03 04:08:42 -05:00
|
|
|
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
|