Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
883dbbb2
Commit
883dbbb2
authored
Sep 28, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecations Ruby 2.7 several counter specs
parent
1c6af0e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb
.../gitlab/usage_data_counters/editor_unique_counter_spec.rb
+6
-6
spec/lib/gitlab/usage_data_counters/track_unique_events_spec.rb
...ib/gitlab/usage_data_counters/track_unique_events_spec.rb
+2
-2
No files found.
spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb
View file @
883dbbb2
...
...
@@ -41,11 +41,11 @@ RSpec.describe Gitlab::UsageDataCounters::EditorUniqueCounter, :clean_gitlab_red
context
'for web IDE edit actions'
do
it_behaves_like
'tracks and counts action'
do
def
track_action
(
params
)
described_class
.
track_web_ide_edit_action
(
params
)
described_class
.
track_web_ide_edit_action
(
**
params
)
end
def
count_unique
(
params
)
described_class
.
count_web_ide_edit_actions
(
params
)
described_class
.
count_web_ide_edit_actions
(
**
params
)
end
end
end
...
...
@@ -53,11 +53,11 @@ RSpec.describe Gitlab::UsageDataCounters::EditorUniqueCounter, :clean_gitlab_red
context
'for SFE edit actions'
do
it_behaves_like
'tracks and counts action'
do
def
track_action
(
params
)
described_class
.
track_sfe_edit_action
(
params
)
described_class
.
track_sfe_edit_action
(
**
params
)
end
def
count_unique
(
params
)
described_class
.
count_sfe_edit_actions
(
params
)
described_class
.
count_sfe_edit_actions
(
**
params
)
end
end
end
...
...
@@ -65,11 +65,11 @@ RSpec.describe Gitlab::UsageDataCounters::EditorUniqueCounter, :clean_gitlab_red
context
'for snippet editor edit actions'
do
it_behaves_like
'tracks and counts action'
do
def
track_action
(
params
)
described_class
.
track_snippet_editor_edit_action
(
params
)
described_class
.
track_snippet_editor_edit_action
(
**
params
)
end
def
count_unique
(
params
)
described_class
.
count_snippet_editor_edit_actions
(
params
)
described_class
.
count_snippet_editor_edit_actions
(
**
params
)
end
end
end
...
...
spec/lib/gitlab/usage_data_counters/track_unique_events_spec.rb
View file @
883dbbb2
...
...
@@ -8,11 +8,11 @@ RSpec.describe Gitlab::UsageDataCounters::TrackUniqueEvents, :clean_gitlab_redis
let
(
:time
)
{
Time
.
zone
.
now
}
def
track_event
(
params
)
track_unique_events
.
track_event
(
params
)
track_unique_events
.
track_event
(
**
params
)
end
def
count_unique
(
params
)
track_unique_events
.
count_unique_events
(
params
)
track_unique_events
.
count_unique_events
(
**
params
)
end
context
'tracking an event'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment