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
a18af2ad
Commit
a18af2ad
authored
Aug 24, 2020
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename variables in tests
parent
ae2a65e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+4
-4
No files found.
spec/lib/gitlab/usage_data_spec.rb
View file @
a18af2ad
...
...
@@ -942,8 +942,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
subject
{
described_class
.
analytics_unique_visits_data
}
it
'returns the number of unique visits to pages with analytics features'
do
::
Gitlab
::
Analytics
::
UniqueVisits
.
analytics_events
.
each
do
|
target
_id
|
expect_any_instance_of
(
::
Gitlab
::
Analytics
::
UniqueVisits
).
to
receive
(
:unique_visits_for
).
with
(
targets:
target
_id
).
and_return
(
123
)
::
Gitlab
::
Analytics
::
UniqueVisits
.
analytics_events
.
each
do
|
target
|
expect_any_instance_of
(
::
Gitlab
::
Analytics
::
UniqueVisits
).
to
receive
(
:unique_visits_for
).
with
(
targets:
target
).
and_return
(
123
)
end
expect_any_instance_of
(
::
Gitlab
::
Analytics
::
UniqueVisits
).
to
receive
(
:unique_visits_for
).
with
(
targets: :analytics
).
and_return
(
543
)
...
...
@@ -978,8 +978,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
described_class
.
clear_memoization
(
:unique_visit_service
)
allow_next_instance_of
(
::
Gitlab
::
Analytics
::
UniqueVisits
)
do
|
instance
|
::
Gitlab
::
Analytics
::
UniqueVisits
.
compliance_events
.
each
do
|
target
_id
|
allow
(
instance
).
to
receive
(
:unique_visits_for
).
with
(
targets:
target
_id
).
and_return
(
123
)
::
Gitlab
::
Analytics
::
UniqueVisits
.
compliance_events
.
each
do
|
target
|
allow
(
instance
).
to
receive
(
:unique_visits_for
).
with
(
targets:
target
).
and_return
(
123
)
end
allow
(
instance
).
to
receive
(
:unique_visits_for
).
with
(
targets: :compliance
).
and_return
(
543
)
...
...
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