diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 18:08:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 18:08:51 +0000 |
commit | df2eda3f14dccb703bd7054d4ddde7803cb1fe7e (patch) | |
tree | 0200bb0def01cde22da3bc4c9ed0a7b0f91d6b50 /spec/lib/event_filter_spec.rb | |
parent | b9bac6dbf78a5a7976fba14aaeef96bdeb0da612 (diff) | |
download | gitlab-ce-df2eda3f14dccb703bd7054d4ddde7803cb1fe7e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/event_filter_spec.rb')
-rw-r--r-- | spec/lib/event_filter_spec.rb | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/spec/lib/event_filter_spec.rb b/spec/lib/event_filter_spec.rb index 21b8f726425..e35698f6030 100644 --- a/spec/lib/event_filter_spec.rb +++ b/spec/lib/event_filter_spec.rb @@ -18,17 +18,16 @@ describe EventFilter do end describe '#apply_filter' do - set(:public_project) { create(:project, :public) } - - set(:push_event) { create(:push_event, project: public_project) } - set(:merged_event) { create(:event, :merged, project: public_project, target: public_project) } - set(:created_event) { create(:event, :created, project: public_project, target: create(:issue, project: public_project)) } - set(:updated_event) { create(:event, :updated, project: public_project, target: create(:issue, project: public_project)) } - set(:closed_event) { create(:event, :closed, project: public_project, target: create(:issue, project: public_project)) } - set(:reopened_event) { create(:event, :reopened, project: public_project, target: create(:issue, project: public_project)) } - set(:comments_event) { create(:event, :commented, project: public_project, target: public_project) } - set(:joined_event) { create(:event, :joined, project: public_project, target: public_project) } - set(:left_event) { create(:event, :left, project: public_project, target: public_project) } + let_it_be(:public_project) { create(:project, :public) } + let_it_be(:push_event) { create(:push_event, project: public_project) } + let_it_be(:merged_event) { create(:event, :merged, project: public_project, target: public_project) } + let_it_be(:created_event) { create(:event, :created, project: public_project, target: create(:issue, project: public_project)) } + let_it_be(:updated_event) { create(:event, :updated, project: public_project, target: create(:issue, project: public_project)) } + let_it_be(:closed_event) { create(:event, :closed, project: public_project, target: create(:issue, project: public_project)) } + let_it_be(:reopened_event) { create(:event, :reopened, project: public_project, target: create(:issue, project: public_project)) } + let_it_be(:comments_event) { create(:event, :commented, project: public_project, target: public_project) } + let_it_be(:joined_event) { create(:event, :joined, project: public_project, target: public_project) } + let_it_be(:left_event) { create(:event, :left, project: public_project, target: public_project) } let(:filtered_events) { described_class.new(filter).apply_filter(Event.all) } |