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
b868f90d
Commit
b868f90d
authored
Feb 07, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update spec
parent
b00b2493
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
ee/lib/gitlab/metrics/multi_file_editor.rb
ee/lib/gitlab/metrics/multi_file_editor.rb
+1
-1
spec/ee/spec/lib/gitlab/metrics/multi_file_editor_spec.rb
spec/ee/spec/lib/gitlab/metrics/multi_file_editor_spec.rb
+10
-4
No files found.
ee/lib/gitlab/metrics/multi_file_editor.rb
View file @
b868f90d
...
...
@@ -9,7 +9,7 @@ module Gitlab
def
log
return
unless
::
License
.
feature_available?
(
:ide
)
::
Gitlab
::
AppLogger
.
info
({
test:
1
})
Rails
.
logger
.
info
(
"Web editor usage -
#{
metric_info
}
"
)
end
...
...
spec/ee/spec/lib/gitlab/metrics/multi_file_editor_spec.rb
View file @
b868f90d
...
...
@@ -6,19 +6,25 @@ describe Gitlab::Metrics::MultiFileEditor do
subject
{
described_class
.
new
(
project
,
user
,
project
.
commit
(
'b83d6e391c22777fca1ed3012fce84f633d7fed0'
))
}
before
do
stub_licensed_features
(
ide:
true
)
end
describe
'.record'
do
describe
'metrics'
do
it
'has the right log info'
do
stub_licensed_features
(
ide:
true
)
info
=
"Web editor usage - ide_usage_project_id:
#{
project
.
id
}
, ide_usage_user:
#{
user
.
id
}
, ide_usage_line_count: 1, ide_usage_file_count: 1"
expect
(
Rails
.
logger
).
to
receive
(
:info
).
with
(
info
)
subject
.
log
end
it
'does not log any info if IDE is disabled'
do
info
=
"Web editor usage - ide_usage_project_id:
#{
project
.
id
}
, ide_usage_user:
#{
user
.
id
}
, ide_usage_line_count: 1, ide_usage_file_count: 1"
expect
(
Rails
.
logger
).
not_to
receive
(
:info
).
with
(
info
)
subject
.
log
end
end
end
end
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