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
cb171937
Commit
cb171937
authored
Apr 07, 2021
by
Abdul Wadood
Committed by
Mayra Cabrera
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/models
parent
1834ff50
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
38 additions
and
23 deletions
+38
-23
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-23
ee/changelogs/unreleased/rspec-empty-lines-after-letitbe-ee-spec-models.yml
...leased/rspec-empty-lines-after-letitbe-ee-spec-models.yml
+5
-0
ee/spec/models/analytics/cycle_analytics/group_level_spec.rb
ee/spec/models/analytics/cycle_analytics/group_level_spec.rb
+1
-0
ee/spec/models/burndown_spec.rb
ee/spec/models/burndown_spec.rb
+1
-0
ee/spec/models/ci/build_spec.rb
ee/spec/models/ci/build_spec.rb
+1
-0
ee/spec/models/ci/daily_build_group_report_result_spec.rb
ee/spec/models/ci/daily_build_group_report_result_spec.rb
+1
-0
ee/spec/models/ci/minutes/notification_spec.rb
ee/spec/models/ci/minutes/notification_spec.rb
+1
-0
ee/spec/models/concerns/epic_tree_sorting_spec.rb
ee/spec/models/concerns/epic_tree_sorting_spec.rb
+1
-0
ee/spec/models/dora/daily_metrics_spec.rb
ee/spec/models/dora/daily_metrics_spec.rb
+1
-0
ee/spec/models/ee/ci/build_dependencies_spec.rb
ee/spec/models/ee/ci/build_dependencies_spec.rb
+1
-0
ee/spec/models/ee/iteration_spec.rb
ee/spec/models/ee/iteration_spec.rb
+2
-0
ee/spec/models/ee/namespace/root_storage_size_spec.rb
ee/spec/models/ee/namespace/root_storage_size_spec.rb
+1
-0
ee/spec/models/ee/namespace_spec.rb
ee/spec/models/ee/namespace_spec.rb
+1
-0
ee/spec/models/ee/personal_access_token_spec.rb
ee/spec/models/ee/personal_access_token_spec.rb
+1
-0
ee/spec/models/epic_spec.rb
ee/spec/models/epic_spec.rb
+2
-0
ee/spec/models/geo/lfs_object_registry_spec.rb
ee/spec/models/geo/lfs_object_registry_spec.rb
+1
-0
ee/spec/models/gitlab_subscription_spec.rb
ee/spec/models/gitlab_subscription_spec.rb
+1
-0
ee/spec/models/group_member_spec.rb
ee/spec/models/group_member_spec.rb
+1
-0
ee/spec/models/instance_security_dashboard_spec.rb
ee/spec/models/instance_security_dashboard_spec.rb
+1
-0
ee/spec/models/issue_spec.rb
ee/spec/models/issue_spec.rb
+2
-0
ee/spec/models/label_note_spec.rb
ee/spec/models/label_note_spec.rb
+1
-0
ee/spec/models/merge_request_spec.rb
ee/spec/models/merge_request_spec.rb
+2
-0
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+5
-0
ee/spec/models/requirements_management/test_report_spec.rb
ee/spec/models/requirements_management/test_report_spec.rb
+1
-0
ee/spec/models/vulnerabilities/finding_spec.rb
ee/spec/models/vulnerabilities/finding_spec.rb
+3
-0
No files found.
.rubocop_manual_todo.yml
View file @
cb171937
...
@@ -544,29 +544,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
...
@@ -544,29 +544,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
-
ee/spec/lib/gitlab/graphql/aggregations/vulnerability_statistics/lazy_aggregate_spec.rb
-
ee/spec/lib/gitlab/graphql/aggregations/vulnerability_statistics/lazy_aggregate_spec.rb
-
ee/spec/lib/gitlab/insights/project_insights_config_spec.rb
-
ee/spec/lib/gitlab/insights/project_insights_config_spec.rb
-
ee/spec/lib/gitlab/sitemaps/url_extractor_spec.rb
-
ee/spec/lib/gitlab/sitemaps/url_extractor_spec.rb
-
ee/spec/models/analytics/cycle_analytics/group_level_spec.rb
-
ee/spec/models/burndown_spec.rb
-
ee/spec/models/ci/build_spec.rb
-
ee/spec/models/ci/daily_build_group_report_result_spec.rb
-
ee/spec/models/ci/minutes/notification_spec.rb
-
ee/spec/models/concerns/epic_tree_sorting_spec.rb
-
ee/spec/models/dora/daily_metrics_spec.rb
-
ee/spec/models/ee/ci/build_dependencies_spec.rb
-
ee/spec/models/ee/iteration_spec.rb
-
ee/spec/models/ee/namespace/root_storage_size_spec.rb
-
ee/spec/models/ee/namespace_spec.rb
-
ee/spec/models/ee/personal_access_token_spec.rb
-
ee/spec/models/epic_spec.rb
-
ee/spec/models/geo/lfs_object_registry_spec.rb
-
ee/spec/models/gitlab_subscription_spec.rb
-
ee/spec/models/group_member_spec.rb
-
ee/spec/models/instance_security_dashboard_spec.rb
-
ee/spec/models/issue_spec.rb
-
ee/spec/models/label_note_spec.rb
-
ee/spec/models/merge_request_spec.rb
-
ee/spec/models/project_spec.rb
-
ee/spec/models/requirements_management/test_report_spec.rb
-
ee/spec/models/vulnerabilities/finding_spec.rb
-
ee/spec/policies/clusters/agent_token_policy_spec.rb
-
ee/spec/policies/clusters/agent_token_policy_spec.rb
-
ee/spec/policies/compliance_management/framework_policy_spec.rb
-
ee/spec/policies/compliance_management/framework_policy_spec.rb
-
ee/spec/policies/group_policy_spec.rb
-
ee/spec/policies/group_policy_spec.rb
...
...
ee/changelogs/unreleased/rspec-empty-lines-after-letitbe-ee-spec-models.yml
0 → 100644
View file @
cb171937
---
title
:
Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/models
merge_request
:
58376
author
:
Abdul Wadood @abdulwd
type
:
fixed
ee/spec/models/analytics/cycle_analytics/group_level_spec.rb
View file @
cb171937
...
@@ -9,6 +9,7 @@ RSpec.describe Analytics::CycleAnalytics::GroupLevel do
...
@@ -9,6 +9,7 @@ RSpec.describe Analytics::CycleAnalytics::GroupLevel do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
created_at:
2
.
days
.
ago
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
created_at:
2
.
days
.
ago
)
}
let_it_be
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let_it_be
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let
(
:mr
)
{
create_merge_request_closing_issue
(
user
,
project
,
issue
,
commit_message:
"References
#{
issue
.
to_reference
}
"
)
}
let
(
:mr
)
{
create_merge_request_closing_issue
(
user
,
project
,
issue
,
commit_message:
"References
#{
issue
.
to_reference
}
"
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
status:
'created'
,
project:
project
,
ref:
mr
.
source_branch
,
sha:
mr
.
source_branch_sha
,
head_pipeline_of:
mr
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
status:
'created'
,
project:
project
,
ref:
mr
.
source_branch
,
sha:
mr
.
source_branch_sha
,
head_pipeline_of:
mr
)
}
...
...
ee/spec/models/burndown_spec.rb
View file @
cb171937
...
@@ -4,6 +4,7 @@ require 'spec_helper'
...
@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Burndown
do
RSpec
.
describe
Burndown
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:start_date
)
{
"2017-03-01"
}
let
(
:start_date
)
{
"2017-03-01"
}
let
(
:due_date
)
{
"2017-03-03"
}
let
(
:due_date
)
{
"2017-03-03"
}
...
...
ee/spec/models/ci/build_spec.rb
View file @
cb171937
...
@@ -4,6 +4,7 @@ require 'spec_helper'
...
@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Ci
::
Build
do
RSpec
.
describe
Ci
::
Build
do
let_it_be
(
:group
)
{
create
(
:group_with_plan
,
plan: :bronze_plan
)
}
let_it_be
(
:group
)
{
create
(
:group_with_plan
,
plan: :bronze_plan
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
...
...
ee/spec/models/ci/daily_build_group_report_result_spec.rb
View file @
cb171937
...
@@ -5,6 +5,7 @@ require 'spec_helper'
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Ci
::
DailyBuildGroupReportResult
do
RSpec
.
describe
Ci
::
DailyBuildGroupReportResult
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:group
)
{
create
(
:group
,
projects:
[
project
])
}
let_it_be
(
:group
)
{
create
(
:group
,
projects:
[
project
])
}
let
(
:recent_build_group_report_result
)
{
create
(
:ci_daily_build_group_report_result
,
project:
project
)
}
let
(
:recent_build_group_report_result
)
{
create
(
:ci_daily_build_group_report_result
,
project:
project
)
}
let
(
:old_build_group_report_result
)
do
let
(
:old_build_group_report_result
)
do
create
(
:ci_daily_build_group_report_result
,
date:
1
.
week
.
ago
,
project:
project
)
create
(
:ci_daily_build_group_report_result
,
date:
1
.
week
.
ago
,
project:
project
)
...
...
ee/spec/models/ci/minutes/notification_spec.rb
View file @
cb171937
...
@@ -7,6 +7,7 @@ RSpec.describe Ci::Minutes::Notification do
...
@@ -7,6 +7,7 @@ RSpec.describe Ci::Minutes::Notification do
let
(
:shared_runners_enabled
)
{
true
}
let
(
:shared_runners_enabled
)
{
true
}
let!
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
group
,
shared_runners_enabled:
shared_runners_enabled
)
}
let!
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
group
,
shared_runners_enabled:
shared_runners_enabled
)
}
let_it_be
(
:group
,
refind:
true
)
{
create
(
:group
)
}
let_it_be
(
:group
,
refind:
true
)
{
create
(
:group
)
}
let
(
:injected_group
)
{
group
}
let
(
:injected_group
)
{
group
}
let
(
:injected_project
)
{
project
}
let
(
:injected_project
)
{
project
}
...
...
ee/spec/models/concerns/epic_tree_sorting_spec.rb
View file @
cb171937
...
@@ -5,6 +5,7 @@ require 'spec_helper'
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
EpicTreeSorting
do
RSpec
.
describe
EpicTreeSorting
do
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:base_epic
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:base_epic
)
{
create
(
:epic
,
group:
group
)
}
let!
(
:epic_issue1
)
{
create
(
:epic_issue
,
epic:
base_epic
,
relative_position:
10
)
}
let!
(
:epic_issue1
)
{
create
(
:epic_issue
,
epic:
base_epic
,
relative_position:
10
)
}
let!
(
:epic_issue2
)
{
create
(
:epic_issue
,
epic:
base_epic
,
relative_position:
500
)
}
let!
(
:epic_issue2
)
{
create
(
:epic_issue
,
epic:
base_epic
,
relative_position:
500
)
}
let!
(
:epic_issue3
)
{
create
(
:epic_issue
,
epic:
base_epic
,
relative_position:
1002
)
}
let!
(
:epic_issue3
)
{
create
(
:epic_issue
,
epic:
base_epic
,
relative_position:
1002
)
}
...
...
ee/spec/models/dora/daily_metrics_spec.rb
View file @
cb171937
...
@@ -66,6 +66,7 @@ RSpec.describe Dora::DailyMetrics, type: :model do
...
@@ -66,6 +66,7 @@ RSpec.describe Dora::DailyMetrics, type: :model do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let
(
:date
)
{
1
.
day
.
ago
.
to_date
}
let
(
:date
)
{
1
.
day
.
ago
.
to_date
}
context
'with finished deployments'
do
context
'with finished deployments'
do
...
...
ee/spec/models/ee/ci/build_dependencies_spec.rb
View file @
cb171937
...
@@ -5,6 +5,7 @@ require 'spec_helper'
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Ci
::
BuildDependencies
do
RSpec
.
describe
Ci
::
BuildDependencies
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
,
refind:
true
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
,
refind:
true
)
{
create
(
:project
,
:repository
)
}
let
(
:dependencies
)
{
}
let
(
:dependencies
)
{
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
...
...
ee/spec/models/ee/iteration_spec.rb
View file @
cb171937
...
@@ -36,6 +36,7 @@ RSpec.describe Iteration do
...
@@ -36,6 +36,7 @@ RSpec.describe Iteration do
describe
'setting iteration cadence'
do
describe
'setting iteration cadence'
do
let_it_be
(
:iterations_cadence
)
{
create
(
:iterations_cadence
,
group:
group
,
start_date:
10
.
days
.
ago
)
}
let_it_be
(
:iterations_cadence
)
{
create
(
:iterations_cadence
,
group:
group
,
start_date:
10
.
days
.
ago
)
}
let
(
:iteration
)
{
create
(
:iteration
,
group:
group
,
iterations_cadence:
set_cadence
,
start_date:
2
.
days
.
from_now
)
}
let
(
:iteration
)
{
create
(
:iteration
,
group:
group
,
iterations_cadence:
set_cadence
,
start_date:
2
.
days
.
from_now
)
}
context
'when iterations_cadence is set correctly'
do
context
'when iterations_cadence is set correctly'
do
...
@@ -56,6 +57,7 @@ RSpec.describe Iteration do
...
@@ -56,6 +57,7 @@ RSpec.describe Iteration do
context
'when iterations_cadence does not exists for the group'
do
context
'when iterations_cadence does not exists for the group'
do
let_it_be
(
:group
)
{
create
(
:group
,
name:
'Test group'
)}
let_it_be
(
:group
)
{
create
(
:group
,
name:
'Test group'
)}
let
(
:iteration
)
{
build
(
:iteration
,
group:
group
,
iterations_cadence:
set_cadence
)
}
let
(
:iteration
)
{
build
(
:iteration
,
group:
group
,
iterations_cadence:
set_cadence
)
}
it
'creates a default iterations_cadence and uses it for the iteration'
do
it
'creates a default iterations_cadence and uses it for the iteration'
do
...
...
ee/spec/models/ee/namespace/root_storage_size_spec.rb
View file @
cb171937
...
@@ -9,6 +9,7 @@ RSpec.describe EE::Namespace::RootStorageSize do
...
@@ -9,6 +9,7 @@ RSpec.describe EE::Namespace::RootStorageSize do
let
(
:create_statistics
)
{
create
(
:namespace_root_storage_statistics
,
namespace:
namespace
,
storage_size:
current_size
)}
let
(
:create_statistics
)
{
create
(
:namespace_root_storage_statistics
,
namespace:
namespace
,
storage_size:
current_size
)}
let_it_be
(
:ultimate_plan
,
reload:
true
)
{
create
(
:ultimate_plan
)
}
let_it_be
(
:ultimate_plan
,
reload:
true
)
{
create
(
:ultimate_plan
)
}
let_it_be
(
:plan_limits
,
reload:
true
)
{
create
(
:plan_limits
,
plan:
ultimate_plan
,
storage_size_limit:
100
)
}
let_it_be
(
:plan_limits
,
reload:
true
)
{
create
(
:plan_limits
,
plan:
ultimate_plan
,
storage_size_limit:
100
)
}
let!
(
:subscription
)
{
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
ultimate_plan
)
}
let!
(
:subscription
)
{
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
ultimate_plan
)
}
before
do
before
do
...
...
ee/spec/models/ee/namespace_spec.rb
View file @
cb171937
...
@@ -314,6 +314,7 @@ RSpec.describe Namespace do
...
@@ -314,6 +314,7 @@ RSpec.describe Namespace do
context
'when running on a primary node'
do
context
'when running on a primary node'
do
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
let
(
:gitlab_shell
)
{
Gitlab
::
Shell
.
new
}
let
(
:gitlab_shell
)
{
Gitlab
::
Shell
.
new
}
let
(
:parent_group
)
{
create
(
:group
)
}
let
(
:parent_group
)
{
create
(
:group
)
}
let
(
:child_group
)
{
create
(
:group
,
name:
'child'
,
path:
'child'
,
parent:
parent_group
)
}
let
(
:child_group
)
{
create
(
:group
,
name:
'child'
,
path:
'child'
,
parent:
parent_group
)
}
...
...
ee/spec/models/ee/personal_access_token_spec.rb
View file @
cb171937
...
@@ -7,6 +7,7 @@ RSpec.describe PersonalAccessToken do
...
@@ -7,6 +7,7 @@ RSpec.describe PersonalAccessToken do
let_it_be
(
:expired_token
)
{
create
(
:personal_access_token
,
expires_at:
1
.
day
.
ago
)
}
let_it_be
(
:expired_token
)
{
create
(
:personal_access_token
,
expires_at:
1
.
day
.
ago
)
}
let_it_be
(
:valid_token
)
{
create
(
:personal_access_token
,
expires_at:
1
.
day
.
from_now
)
}
let_it_be
(
:valid_token
)
{
create
(
:personal_access_token
,
expires_at:
1
.
day
.
from_now
)
}
let_it_be
(
:long_expiry_token
)
{
create
(
:personal_access_token
,
expires_at:
'999999-12-31'
.
to_date
)
}
let_it_be
(
:long_expiry_token
)
{
create
(
:personal_access_token
,
expires_at:
'999999-12-31'
.
to_date
)
}
let!
(
:pat
)
{
create
(
:personal_access_token
,
expires_at:
expiration_date
)
}
let!
(
:pat
)
{
create
(
:personal_access_token
,
expires_at:
expiration_date
)
}
describe
'with_expires_at_after'
do
describe
'with_expires_at_after'
do
...
...
ee/spec/models/epic_spec.rb
View file @
cb171937
...
@@ -228,6 +228,7 @@ RSpec.describe Epic do
...
@@ -228,6 +228,7 @@ RSpec.describe Epic do
context
'when adding an Epic that has existing children'
do
context
'when adding an Epic that has existing children'
do
let_it_be
(
:parent_epic
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:parent_epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:epic
)
{
build
(
:epic
,
group:
group
)
}
let
(
:epic
)
{
build
(
:epic
,
group:
group
)
}
it
'returns true when total depth after adding will not exceed limit'
do
it
'returns true when total depth after adding will not exceed limit'
do
...
@@ -250,6 +251,7 @@ RSpec.describe Epic do
...
@@ -250,6 +251,7 @@ RSpec.describe Epic do
context
'when parent has ancestors and epic has children'
do
context
'when parent has ancestors and epic has children'
do
let_it_be
(
:root_epic
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:root_epic
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:parent_epic
)
{
create
(
:epic
,
group:
group
,
parent:
root_epic
)
}
let_it_be
(
:parent_epic
)
{
create
(
:epic
,
group:
group
,
parent:
root_epic
)
}
let
(
:epic
)
{
build
(
:epic
,
group:
group
)
}
let
(
:epic
)
{
build
(
:epic
,
group:
group
)
}
let
(
:child_epic1
)
{
create
(
:epic
,
group:
group
,
parent:
epic
)}
let
(
:child_epic1
)
{
create
(
:epic
,
group:
group
,
parent:
epic
)}
...
...
ee/spec/models/geo/lfs_object_registry_spec.rb
View file @
cb171937
...
@@ -34,6 +34,7 @@ RSpec.describe Geo::LfsObjectRegistry, :geo do
...
@@ -34,6 +34,7 @@ RSpec.describe Geo::LfsObjectRegistry, :geo do
let_it_be
(
:lfs_object_3
)
{
create
(
:lfs_object
)
}
let_it_be
(
:lfs_object_3
)
{
create
(
:lfs_object
)
}
let_it_be
(
:lfs_object_4
)
{
create
(
:lfs_object
)
}
let_it_be
(
:lfs_object_4
)
{
create
(
:lfs_object
)
}
let_it_be
(
:lfs_object_5
)
{
create
(
:lfs_object
)
}
let_it_be
(
:lfs_object_5
)
{
create
(
:lfs_object
)
}
let!
(
:lfs_object_remote_1
)
{
create
(
:lfs_object
,
:object_storage
)
}
let!
(
:lfs_object_remote_1
)
{
create
(
:lfs_object
,
:object_storage
)
}
let!
(
:lfs_object_remote_2
)
{
create
(
:lfs_object
,
:object_storage
)
}
let!
(
:lfs_object_remote_2
)
{
create
(
:lfs_object
,
:object_storage
)
}
let!
(
:lfs_object_remote_3
)
{
create
(
:lfs_object
,
:object_storage
)
}
let!
(
:lfs_object_remote_3
)
{
create
(
:lfs_object
,
:object_storage
)
}
...
...
ee/spec/models/gitlab_subscription_spec.rb
View file @
cb171937
...
@@ -601,6 +601,7 @@ RSpec.describe GitlabSubscription do
...
@@ -601,6 +601,7 @@ RSpec.describe GitlabSubscription do
describe
'#legacy?'
do
describe
'#legacy?'
do
let_it_be
(
:eoa_rollout_date
)
{
GitlabSubscription
::
EOA_ROLLOUT_DATE
.
to_date
}
let_it_be
(
:eoa_rollout_date
)
{
GitlabSubscription
::
EOA_ROLLOUT_DATE
.
to_date
}
let!
(
:gitlab_subscription
)
{
create
(
:gitlab_subscription
,
start_date:
start_date
)
}
let!
(
:gitlab_subscription
)
{
create
(
:gitlab_subscription
,
start_date:
start_date
)
}
subject
{
gitlab_subscription
.
legacy?
}
subject
{
gitlab_subscription
.
legacy?
}
...
...
ee/spec/models/group_member_spec.rb
View file @
cb171937
...
@@ -370,6 +370,7 @@ RSpec.describe GroupMember do
...
@@ -370,6 +370,7 @@ RSpec.describe GroupMember do
context
'group member welcome email'
,
:sidekiq_inline
do
context
'group member welcome email'
,
:sidekiq_inline
do
let_it_be
(
:group
)
{
create
(
:group_with_plan
,
plan: :ultimate_plan
)
}
let_it_be
(
:group
)
{
create
(
:group_with_plan
,
plan: :ultimate_plan
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
context
'when user is provisioned by group'
do
context
'when user is provisioned by group'
do
...
...
ee/spec/models/instance_security_dashboard_spec.rb
View file @
cb171937
...
@@ -9,6 +9,7 @@ RSpec.describe InstanceSecurityDashboard do
...
@@ -9,6 +9,7 @@ RSpec.describe InstanceSecurityDashboard do
let_it_be
(
:pipeline1
)
{
create
(
:ci_pipeline
,
project:
project1
)
}
let_it_be
(
:pipeline1
)
{
create
(
:ci_pipeline
,
project:
project1
)
}
let_it_be
(
:pipeline2
)
{
create
(
:ci_pipeline
,
project:
project2
)
}
let_it_be
(
:pipeline2
)
{
create
(
:ci_pipeline
,
project:
project2
)
}
let_it_be
(
:pipeline3
)
{
create
(
:ci_pipeline
,
project:
project3
)
}
let_it_be
(
:pipeline3
)
{
create
(
:ci_pipeline
,
project:
project3
)
}
let
(
:project_ids
)
{
[
project1
.
id
]
}
let
(
:project_ids
)
{
[
project1
.
id
]
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
ee/spec/models/issue_spec.rb
View file @
cb171937
...
@@ -541,6 +541,7 @@ RSpec.describe Issue do
...
@@ -541,6 +541,7 @@ RSpec.describe Issue do
let_it_be
(
:project1
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:project1
)
{
create
(
:project
,
group:
group
)
}
let_it_be_with_reload
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be_with_reload
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be_with_reload
(
:issue1
)
{
create
(
:issue
,
project:
project1
,
relative_position:
issue
.
relative_position
+
RelativePositioning
::
IDEAL_DISTANCE
)
}
let_it_be_with_reload
(
:issue1
)
{
create
(
:issue
,
project:
project1
,
relative_position:
issue
.
relative_position
+
RelativePositioning
::
IDEAL_DISTANCE
)
}
let
(
:new_issue
)
{
build
(
:issue
,
project:
project1
,
relative_position:
nil
)
}
let
(
:new_issue
)
{
build
(
:issue
,
project:
project1
,
relative_position:
nil
)
}
describe
'.relative_positioning_query_base'
do
describe
'.relative_positioning_query_base'
do
...
@@ -896,6 +897,7 @@ RSpec.describe Issue do
...
@@ -896,6 +897,7 @@ RSpec.describe Issue do
end
end
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
nil
}
let
(
:group
)
{
nil
}
subject
{
issue
.
can_be_promoted_to_epic?
(
user
,
group
)
}
subject
{
issue
.
can_be_promoted_to_epic?
(
user
,
group
)
}
...
...
ee/spec/models/label_note_spec.rb
View file @
cb171937
...
@@ -11,6 +11,7 @@ RSpec.describe LabelNote do
...
@@ -11,6 +11,7 @@ RSpec.describe LabelNote do
let_it_be
(
:label2
)
{
create
(
:group_label
,
group:
group
)
}
let_it_be
(
:label2
)
{
create
(
:group_label
,
group:
group
)
}
let
(
:resource_parent
)
{
group
}
let
(
:resource_parent
)
{
group
}
let_it_be
(
:resource
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:resource
)
{
create
(
:epic
,
group:
group
)
}
let
(
:project
)
{
nil
}
let
(
:project
)
{
nil
}
let
(
:resource_key
)
{
resource
.
class
.
name
.
underscore
.
to_s
}
let
(
:resource_key
)
{
resource
.
class
.
name
.
underscore
.
to_s
}
let
(
:events
)
{
[
create
(
:resource_label_event
,
label:
label
,
resource_key
=>
resource
)]
}
let
(
:events
)
{
[
create
(
:resource_label_event
,
label:
label
,
resource_key
=>
resource
)]
}
...
...
ee/spec/models/merge_request_spec.rb
View file @
cb171937
...
@@ -908,6 +908,7 @@ RSpec.describe MergeRequest do
...
@@ -908,6 +908,7 @@ RSpec.describe MergeRequest do
subject
{
merge_request
.
compare_coverage_fuzzing_reports
(
current_user
)
}
subject
{
merge_request
.
compare_coverage_fuzzing_reports
(
current_user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
users
.
first
}
let
(
:current_user
)
{
project
.
users
.
first
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
...
@@ -968,6 +969,7 @@ RSpec.describe MergeRequest do
...
@@ -968,6 +969,7 @@ RSpec.describe MergeRequest do
subject
{
merge_request
.
compare_api_fuzzing_reports
(
current_user
)
}
subject
{
merge_request
.
compare_api_fuzzing_reports
(
current_user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
users
.
first
}
let
(
:current_user
)
{
project
.
users
.
first
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
...
...
ee/spec/models/project_spec.rb
View file @
cb171937
...
@@ -167,6 +167,7 @@ RSpec.describe Project do
...
@@ -167,6 +167,7 @@ RSpec.describe Project do
describe
'approval_rules association'
do
describe
'approval_rules association'
do
let_it_be
(
:rule
,
reload:
true
)
{
create
(
:approval_project_rule
)
}
let_it_be
(
:rule
,
reload:
true
)
{
create
(
:approval_project_rule
)
}
let
(
:project
)
{
rule
.
project
}
let
(
:project
)
{
rule
.
project
}
let
(
:branch
)
{
'stable'
}
let
(
:branch
)
{
'stable'
}
...
@@ -399,6 +400,7 @@ RSpec.describe Project do
...
@@ -399,6 +400,7 @@ RSpec.describe Project do
let_it_be
(
:project_1
)
{
create
(
:project_statistics
,
lfs_objects_size:
10
,
repository_size:
10
).
project
}
let_it_be
(
:project_1
)
{
create
(
:project_statistics
,
lfs_objects_size:
10
,
repository_size:
10
).
project
}
let_it_be
(
:project_2
)
{
create
(
:project_statistics
,
lfs_objects_size:
5
,
repository_size:
55
).
project
}
let_it_be
(
:project_2
)
{
create
(
:project_statistics
,
lfs_objects_size:
5
,
repository_size:
55
).
project
}
let_it_be
(
:project_3
)
{
create
(
:project
,
repository_size_limit:
30
,
statistics:
create
(
:project_statistics
,
lfs_objects_size:
8
,
repository_size:
32
))
}
let_it_be
(
:project_3
)
{
create
(
:project
,
repository_size_limit:
30
,
statistics:
create
(
:project_statistics
,
lfs_objects_size:
8
,
repository_size:
32
))
}
let
(
:limit
)
{
20
}
let
(
:limit
)
{
20
}
subject
{
described_class
.
order_by_total_repository_size_excess_desc
(
limit
)
}
subject
{
described_class
.
order_by_total_repository_size_excess_desc
(
limit
)
}
...
@@ -1175,6 +1177,7 @@ RSpec.describe Project do
...
@@ -1175,6 +1177,7 @@ RSpec.describe Project do
describe
'#shared_runners_limit_namespace'
do
describe
'#shared_runners_limit_namespace'
do
let_it_be
(
:root_ancestor
)
{
create
(
:group
)
}
let_it_be
(
:root_ancestor
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
,
parent:
root_ancestor
)
}
let_it_be
(
:group
)
{
create
(
:group
,
parent:
root_ancestor
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
subject
{
project
.
shared_runners_limit_namespace
}
subject
{
project
.
shared_runners_limit_namespace
}
...
@@ -1337,6 +1340,7 @@ RSpec.describe Project do
...
@@ -1337,6 +1340,7 @@ RSpec.describe Project do
describe
'#visible_user_defined_inapplicable_rules'
do
describe
'#visible_user_defined_inapplicable_rules'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let!
(
:rule
)
{
create
(
:approval_project_rule
,
project:
project
)
}
let!
(
:rule
)
{
create
(
:approval_project_rule
,
project:
project
)
}
let!
(
:another_rule
)
{
create
(
:approval_project_rule
,
project:
project
)
}
let!
(
:another_rule
)
{
create
(
:approval_project_rule
,
project:
project
)
}
...
@@ -1926,6 +1930,7 @@ RSpec.describe Project do
...
@@ -1926,6 +1930,7 @@ RSpec.describe Project do
context
'Geo repository update events'
do
context
'Geo repository update events'
do
let_it_be
(
:import_state
)
{
create
(
:import_state
,
:started
,
project:
project
)
}
let_it_be
(
:import_state
)
{
create
(
:import_state
,
:started
,
project:
project
)
}
let
(
:repository_updated_service
)
{
instance_double
(
'::Geo::RepositoryUpdatedService'
)
}
let
(
:repository_updated_service
)
{
instance_double
(
'::Geo::RepositoryUpdatedService'
)
}
let
(
:wiki_updated_service
)
{
instance_double
(
'::Geo::RepositoryUpdatedService'
)
}
let
(
:wiki_updated_service
)
{
instance_double
(
'::Geo::RepositoryUpdatedService'
)
}
let
(
:design_updated_service
)
{
instance_double
(
'::Geo::RepositoryUpdatedService'
)
}
let
(
:design_updated_service
)
{
instance_double
(
'::Geo::RepositoryUpdatedService'
)
}
...
...
ee/spec/models/requirements_management/test_report_spec.rb
View file @
cb171937
...
@@ -115,6 +115,7 @@ RSpec.describe RequirementsManagement::TestReport do
...
@@ -115,6 +115,7 @@ RSpec.describe RequirementsManagement::TestReport do
let_it_be
(
:build_author
)
{
create
(
:user
)
}
let_it_be
(
:build_author
)
{
create
(
:user
)
}
let_it_be
(
:build
)
{
create
(
:ci_build
,
author:
build_author
)
}
let_it_be
(
:build
)
{
create
(
:ci_build
,
author:
build_author
)
}
let_it_be
(
:requirement
)
{
create
(
:requirement
,
state: :opened
)
}
let_it_be
(
:requirement
)
{
create
(
:requirement
,
state: :opened
)
}
let
(
:now
)
{
Time
.
current
}
let
(
:now
)
{
Time
.
current
}
context
'when build is passed as argument'
do
context
'when build is passed as argument'
do
...
...
ee/spec/models/vulnerabilities/finding_spec.rb
View file @
cb171937
...
@@ -272,6 +272,7 @@ RSpec.describe Vulnerabilities::Finding do
...
@@ -272,6 +272,7 @@ RSpec.describe Vulnerabilities::Finding do
describe
'.undismissed'
do
describe
'.undismissed'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
)
}
let!
(
:finding1
)
{
create
(
:vulnerabilities_finding
,
project:
project
)
}
let!
(
:finding1
)
{
create
(
:vulnerabilities_finding
,
project:
project
)
}
let!
(
:finding2
)
{
create
(
:vulnerabilities_finding
,
project:
project
,
report_type: :dast
)
}
let!
(
:finding2
)
{
create
(
:vulnerabilities_finding
,
project:
project
,
report_type: :dast
)
}
let!
(
:finding3
)
{
create
(
:vulnerabilities_finding
,
project:
project2
)
}
let!
(
:finding3
)
{
create
(
:vulnerabilities_finding
,
project:
project2
)
}
...
@@ -310,6 +311,7 @@ RSpec.describe Vulnerabilities::Finding do
...
@@ -310,6 +311,7 @@ RSpec.describe Vulnerabilities::Finding do
describe
'.dismissed'
do
describe
'.dismissed'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
)
}
let!
(
:finding1
)
{
create
(
:vulnerabilities_finding
,
project:
project
)
}
let!
(
:finding1
)
{
create
(
:vulnerabilities_finding
,
project:
project
)
}
let!
(
:finding2
)
{
create
(
:vulnerabilities_finding
,
project:
project
,
report_type: :dast
)
}
let!
(
:finding2
)
{
create
(
:vulnerabilities_finding
,
project:
project
,
report_type: :dast
)
}
let!
(
:finding3
)
{
create
(
:vulnerabilities_finding
,
project:
project2
)
}
let!
(
:finding3
)
{
create
(
:vulnerabilities_finding
,
project:
project2
)
}
...
@@ -509,6 +511,7 @@ RSpec.describe Vulnerabilities::Finding do
...
@@ -509,6 +511,7 @@ RSpec.describe Vulnerabilities::Finding do
describe
'feedback'
do
describe
'feedback'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:finding
)
do
let
(
:finding
)
do
create
(
create
(
:vulnerabilities_finding
,
:vulnerabilities_finding
,
...
...
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