diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/services/resource_events | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/services/resource_events')
-rw-r--r-- | spec/services/resource_events/change_milestone_service_spec.rb | 10 | ||||
-rw-r--r-- | spec/services/resource_events/merge_into_notes_service_spec.rb | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/spec/services/resource_events/change_milestone_service_spec.rb b/spec/services/resource_events/change_milestone_service_spec.rb index bc634fadadd..dec01d0db8d 100644 --- a/spec/services/resource_events/change_milestone_service_spec.rb +++ b/spec/services/resource_events/change_milestone_service_spec.rb @@ -3,11 +3,9 @@ require 'spec_helper' describe ResourceEvents::ChangeMilestoneService do - it_behaves_like 'a milestone events creator' do - let(:resource) { create(:issue) } - end - - it_behaves_like 'a milestone events creator' do - let(:resource) { create(:merge_request) } + [:issue, :merge_request].each do |issuable| + it_behaves_like 'a milestone events creator' do + let(:resource) { create(issuable) } + end end end diff --git a/spec/services/resource_events/merge_into_notes_service_spec.rb b/spec/services/resource_events/merge_into_notes_service_spec.rb index 6bad1b86fca..2664a27244d 100644 --- a/spec/services/resource_events/merge_into_notes_service_spec.rb +++ b/spec/services/resource_events/merge_into_notes_service_spec.rb @@ -21,7 +21,7 @@ describe ResourceEvents::MergeIntoNotesService do let_it_be(:resource) { create(:issue, project: project) } let_it_be(:label) { create(:label, project: project) } let_it_be(:label2) { create(:label, project: project) } - let(:time) { Time.now } + let(:time) { Time.current } describe '#execute' do it 'merges label events into notes in order of created_at' do |