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
a3244cac
Commit
a3244cac
authored
Jan 30, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add metrics spec
parent
59e051cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
spec/ee/spec/lib/gitlab/metrics/multi_file_editor_spec.rb
spec/ee/spec/lib/gitlab/metrics/multi_file_editor_spec.rb
+32
-0
No files found.
spec/ee/spec/lib/gitlab/metrics/multi_file_editor_spec.rb
0 → 100644
View file @
a3244cac
require
'spec_helper'
describe
Gitlab
::
Metrics
::
MultiFileEditor
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:params
)
do
[
:multi_file_editor_usage
,
'Total number of commits using the multi-file web editor'
,
{
project:
'abcd'
,
user:
'abcd'
,
line_changes:
1
,
files_count:
1
}
]
end
subject
{
described_class
.
new
(
project
,
user
,
project
.
repository
.
commit
(
'HEAD'
))
}
before
do
allow
(
Digest
::
SHA256
).
to
receive
(
:hexdigest
).
and_return
(
'abcd'
)
end
describe
'.record'
do
it
'records the right number of commit files'
do
expect
(
::
Gitlab
::
Metrics
).
to
receive
(
:counter
).
with
(
*
params
)
subject
.
record
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