2020-02-19 13:09:10 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 11:08:50 -04:00
|
|
|
RSpec.describe ResourceEvents::ChangeMilestoneService do
|
2020-08-20 02:10:17 -04:00
|
|
|
let_it_be(:timebox) { create(:milestone) }
|
|
|
|
|
|
|
|
let(:created_at_time) { Time.utc(2019, 12, 30) }
|
2021-02-04 16:09:06 -05:00
|
|
|
let(:add_timebox_args) { { old_milestone: nil } }
|
|
|
|
let(:remove_timebox_args) { { old_milestone: timebox } }
|
2020-08-20 02:10:17 -04:00
|
|
|
|
2020-05-14 11:08:14 -04:00
|
|
|
[:issue, :merge_request].each do |issuable|
|
2020-08-20 02:10:17 -04:00
|
|
|
it_behaves_like 'timebox(milestone or iteration) resource events creator', ResourceMilestoneEvent do
|
2020-10-21 11:10:28 -04:00
|
|
|
let_it_be(:resource) { create(issuable) } # rubocop:disable Rails/SaveBang
|
2020-05-14 11:08:14 -04:00
|
|
|
end
|
2020-02-19 13:09:10 -05:00
|
|
|
end
|
|
|
|
end
|