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
9b657ad5
Commit
9b657ad5
authored
Mar 05, 2020
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update mock creation to use established style
parent
2e08c928
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
ee/spec/lib/ee/gitlab/usage_data_spec.rb
ee/spec/lib/ee/gitlab/usage_data_spec.rb
+12
-8
No files found.
ee/spec/lib/ee/gitlab/usage_data_spec.rb
View file @
9b657ad5
...
...
@@ -347,7 +347,8 @@ describe Gitlab::UsageData do
let_it_be
(
:user
)
{
create
(
:user
,
group_view: :security_dashboard
)
}
before
do
Timecop
.
travel
2
.
days
.
ago
do
[
29
,
2
].
each
do
|
n
|
Timecop
.
travel
n
.
days
.
ago
do
create
(
:ci_build
,
name:
'container_scanning'
,
user:
user
)
create
(
:ci_build
,
name:
'dast'
,
user:
user
)
create
(
:ci_build
,
name:
'dependency_scanning'
,
user:
user
)
...
...
@@ -355,6 +356,7 @@ describe Gitlab::UsageData do
create
(
:ci_build
,
name:
'sast'
,
user:
user
)
end
end
end
it
'includes accurate usage_activity_by_stage data'
do
expect
(
described_class
.
uncached_data
[
:usage_activity_by_stage_monthly
][
:secure
]).
to
eq
(
...
...
@@ -368,9 +370,11 @@ describe Gitlab::UsageData do
end
it
'combines license_scanning into license_management'
do
Timecop
.
travel
2
.
days
.
ago
do
[
29
,
2
].
each
do
|
n
|
Timecop
.
travel
n
.
days
.
ago
do
create
(
:ci_build
,
name:
'license_scanning'
,
user:
user
)
end
end
expect
(
described_class
.
uncached_data
[
:usage_activity_by_stage_monthly
][
:secure
]).
to
eq
(
user_preferences_group_overview_security_dashboard:
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