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
9f9303a6
Commit
9f9303a6
authored
Sep 03, 2019
by
manojmj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor spec: statistics_spec.rb
parent
b51466d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
spec/requests/api/statistics_spec.rb
spec/requests/api/statistics_spec.rb
+17
-11
No files found.
spec/requests/api/statistics_spec.rb
View file @
9f9303a6
...
...
@@ -56,17 +56,23 @@ describe API::Statistics, 'Statistics' do
get
api
(
path
,
admin
)
expect
(
json_response
[
'issues'
]).
to
eq
(
'2'
)
expect
(
json_response
[
'merge_requests'
]).
to
eq
(
'1'
)
expect
(
json_response
[
'notes'
]).
to
eq
(
'2'
)
expect
(
json_response
[
'snippets'
]).
to
eq
(
'2'
)
expect
(
json_response
[
'forks'
]).
to
eq
(
'1'
)
expect
(
json_response
[
'ssh_keys'
]).
to
eq
(
'1'
)
expect
(
json_response
[
'milestones'
]).
to
eq
(
'3'
)
expect
(
json_response
[
'users'
]).
to
eq
(
'1'
)
expect
(
json_response
[
'projects'
]).
to
eq
(
'5'
)
# projects + forks
expect
(
json_response
[
'groups'
]).
to
eq
(
'1'
)
expect
(
json_response
[
'active_users'
]).
to
eq
(
'1'
)
expected_statistics
=
{
issues:
2
,
merge_requests:
1
,
notes:
2
,
snippets:
2
,
forks:
1
,
ssh_keys:
1
,
milestones:
3
,
users:
1
,
projects:
5
,
groups:
1
,
active_users:
1
}
expected_statistics
.
each
do
|
entity
,
count
|
expect
(
json_response
[
entity
.
to_s
]).
to
eq
(
count
.
to_s
)
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