summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/contributions_calendar_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/lib/gitlab/contributions_calendar_spec.rb
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/lib/gitlab/contributions_calendar_spec.rb')
-rw-r--r--spec/lib/gitlab/contributions_calendar_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/contributions_calendar_spec.rb b/spec/lib/gitlab/contributions_calendar_spec.rb
index 1154f029a8d..97742a3e815 100644
--- a/spec/lib/gitlab/contributions_calendar_spec.rb
+++ b/spec/lib/gitlab/contributions_calendar_spec.rb
@@ -42,7 +42,7 @@ describe Gitlab::ContributionsCalendar do
described_class.new(contributor, current_user)
end
- def create_event(project, day, hour = 0, action = Event::CREATED, target_symbol = :issue)
+ def create_event(project, day, hour = 0, action = :created, target_symbol = :issue)
@targets ||= {}
@targets[project] ||= create(target_symbol, project: project, author: contributor)
@@ -77,14 +77,14 @@ describe Gitlab::ContributionsCalendar do
end
it "counts the diff notes on merge request" do
- create_event(public_project, today, 0, Event::COMMENTED, :diff_note_on_merge_request)
+ create_event(public_project, today, 0, :commented, :diff_note_on_merge_request)
expect(calendar(contributor).activity_dates[today]).to eq(1)
end
it "counts the discussions on merge requests and issues" do
- create_event(public_project, today, 0, Event::COMMENTED, :discussion_note_on_merge_request)
- create_event(public_project, today, 2, Event::COMMENTED, :discussion_note_on_issue)
+ create_event(public_project, today, 0, :commented, :discussion_note_on_merge_request)
+ create_event(public_project, today, 2, :commented, :discussion_note_on_issue)
expect(calendar(contributor).activity_dates[today]).to eq(2)
end