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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
2ead2b97
Commit
2ead2b97
authored
Jul 27, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improce specs of authentication activity class methods
parent
00e4d918
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
spec/lib/gitlab/auth/activity_spec.rb
spec/lib/gitlab/auth/activity_spec.rb
+20
-4
No files found.
spec/lib/gitlab/auth/activity_spec.rb
View file @
2ead2b97
require
'spec_helper'
require
'
fast_
spec_helper'
describe
Gitlab
::
Auth
::
Activity
do
describe
'
#
each_counter'
do
describe
'
.
each_counter'
do
it
'has all static counters defined'
do
described_class
.
each_counter
do
|
counter
|
expect
(
described_class
).
to
respond_to
(
counter
)
end
end
# todo incrementer pairs
# todo all metrics starting with `user`_
it
'has all static incrementers defined'
do
described_class
.
each_counter
do
|
counter
|
expect
(
described_class
).
to
respond_to
(
"
#{
counter
}
_increment!"
)
end
end
it
'has all counters starting with `user_`'
do
described_class
.
each_counter
do
|
counter
|
expect
(
counter
).
to
start_with
(
'user_'
)
end
end
it
'yields counter method, name and description'
do
described_class
.
each_counter
do
|
method
,
name
,
description
|
expect
(
method
).
to
eq
"
#{
name
}
_counter"
expect
(
description
).
to
start_with
(
'Counter of'
)
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