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
81606d9e
Commit
81606d9e
authored
Oct 07, 2020
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CoverageReportsController spec optimization
parent
b4b7d577
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
ee/spec/controllers/groups/analytics/coverage_reports_controller_spec.rb
...lers/groups/analytics/coverage_reports_controller_spec.rb
+11
-12
No files found.
ee/spec/controllers/groups/analytics/coverage_reports_controller_spec.rb
View file @
81606d9e
...
...
@@ -3,15 +3,15 @@
require
'spec_helper'
RSpec
.
describe
Groups
::
Analytics
::
CoverageReportsController
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:ref_path
)
{
'refs/heads/master'
}
let
_it_be
(
:user
)
{
create
(
:user
)
}
let
_it_be
(
:group
)
{
create
(
:group
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
_it_be
(
:ref_path
)
{
'refs/heads/master'
}
let
!
(
:first_coverage
)
{
create_daily_coverage
(
'rspec'
,
project
,
79.0
,
'2020-03-09'
)
}
let
!
(
:last_coverage
)
{
create_daily_coverage
(
'karma'
,
project
,
95.0
,
'2020-03-10'
)
}
let
_it_be
(
:first_coverage
)
{
create_daily_coverage
(
'rspec'
,
project
,
79.0
,
'2020-03-09'
)
}
let
_it_be
(
:last_coverage
)
{
create_daily_coverage
(
'karma'
,
project
,
95.0
,
'2020-03-10'
)
}
let
(
:valid_request_params
)
do
let
_it_be
(
:valid_request_params
)
do
{
group_id:
group
.
name
,
start_date:
'2020-03-01'
,
...
...
@@ -21,11 +21,11 @@ RSpec.describe Groups::Analytics::CoverageReportsController do
}
end
context
'without permissions'
do
before
do
sign_in
(
user
)
end
before
do
sign_in
(
user
)
end
context
'without permissions'
do
describe
'GET index'
do
it
'responds 403'
do
get
:index
,
params:
valid_request_params
...
...
@@ -38,7 +38,6 @@ RSpec.describe Groups::Analytics::CoverageReportsController do
context
'with permissions'
do
before
do
group
.
add_owner
(
user
)
sign_in
(
user
)
end
context
'without a license'
do
...
...
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