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
12587a48
Commit
12587a48
authored
Aug 30, 2019
by
manojmj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests
parent
a453ea9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
doc/api/statistics.md
doc/api/statistics.md
+1
-1
spec/features/admin/dashboard_spec.rb
spec/features/admin/dashboard_spec.rb
+1
-1
spec/requests/api/statistics_spec.rb
spec/requests/api/statistics_spec.rb
+10
-1
No files found.
doc/api/statistics.md
View file @
12587a48
...
...
@@ -29,4 +29,4 @@ Example response:
"milestones"
:
"40"
,
"active_users"
:
"50"
}
```
\ No newline at end of file
```
spec/features/admin/dashboard_spec.rb
View file @
12587a48
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
'admin visits dashboard'
do
describe
'admin visits dashboard'
,
:js
do
include
ProjectForksHelper
before
do
...
...
spec/requests/api/statistics_spec.rb
View file @
12587a48
...
...
@@ -3,6 +3,8 @@
require
'spec_helper'
describe
API
::
Statistics
,
'Statistics'
do
include
ProjectForksHelper
let
(
:path
)
{
"/application/statistics"
}
describe
"GET /application/statistics"
do
...
...
@@ -43,6 +45,13 @@ describe API::Statistics, 'Statistics' do
create_list
(
:milestone
,
3
,
project:
projects
.
first
)
create
(
:key
,
user:
admin
)
create
(
:merge_request
,
source_project:
projects
.
first
)
fork_project
(
projects
.
first
,
admin
)
# Make sure the reltuples have been updated
# to get a correct count on postgresql
%w[issues merge_requests notes snippets fork_networks fork_network_members keys milestones users]
.
each
do
|
table
|
ActiveRecord
::
Base
.
connection
.
execute
(
"ANALYZE
#{
table
}
"
)
end
get
api
(
path
,
admin
)
...
...
@@ -50,7 +59,7 @@ describe API::Statistics, 'Statistics' do
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
(
'
0
'
)
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
[
'active_users'
]).
to
eq
(
'1'
)
...
...
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