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
e4e8f18c
Commit
e4e8f18c
authored
Jan 14, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change set to let_it_be in ee/spec/models
Contributes to a removal of rspec-set gem
parent
cbb9492a
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
86 additions
and
86 deletions
+86
-86
ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb
ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb
+2
-2
ee/spec/models/alerting/project_alerting_setting_spec.rb
ee/spec/models/alerting/project_alerting_setting_spec.rb
+1
-1
ee/spec/models/application_setting_spec.rb
ee/spec/models/application_setting_spec.rb
+6
-6
ee/spec/models/burndown_spec.rb
ee/spec/models/burndown_spec.rb
+2
-2
ee/spec/models/ci/bridge_spec.rb
ee/spec/models/ci/bridge_spec.rb
+3
-3
ee/spec/models/ci/build_spec.rb
ee/spec/models/ci/build_spec.rb
+1
-1
ee/spec/models/ci/job_artifact_spec.rb
ee/spec/models/ci/job_artifact_spec.rb
+2
-2
ee/spec/models/ci/pipeline_spec.rb
ee/spec/models/ci/pipeline_spec.rb
+1
-1
ee/spec/models/concerns/elastic/issue_spec.rb
ee/spec/models/concerns/elastic/issue_spec.rb
+3
-3
ee/spec/models/concerns/elastic/merge_request_spec.rb
ee/spec/models/concerns/elastic/merge_request_spec.rb
+2
-2
ee/spec/models/concerns/elastic/milestone_spec.rb
ee/spec/models/concerns/elastic/milestone_spec.rb
+2
-2
ee/spec/models/concerns/elastic/note_spec.rb
ee/spec/models/concerns/elastic/note_spec.rb
+2
-2
ee/spec/models/concerns/elastic/project_spec.rb
ee/spec/models/concerns/elastic/project_spec.rb
+2
-2
ee/spec/models/concerns/elastic/project_wiki_spec.rb
ee/spec/models/concerns/elastic/project_wiki_spec.rb
+1
-1
ee/spec/models/design_management/action_spec.rb
ee/spec/models/design_management/action_spec.rb
+9
-9
ee/spec/models/design_management/design_at_version_spec.rb
ee/spec/models/design_management/design_at_version_spec.rb
+4
-4
ee/spec/models/design_management/design_collection_spec.rb
ee/spec/models/design_management/design_collection_spec.rb
+1
-1
ee/spec/models/design_management/design_spec.rb
ee/spec/models/design_management/design_spec.rb
+1
-1
ee/spec/models/ee/appearance_spec.rb
ee/spec/models/ee/appearance_spec.rb
+2
-2
ee/spec/models/ee/event_spec.rb
ee/spec/models/ee/event_spec.rb
+5
-5
ee/spec/models/ee/note_spec.rb
ee/spec/models/ee/note_spec.rb
+2
-2
ee/spec/models/geo/container_repository_registry_spec.rb
ee/spec/models/geo/container_repository_registry_spec.rb
+1
-1
ee/spec/models/incident_management/project_incident_management_setting_spec.rb
...nt_management/project_incident_management_setting_spec.rb
+1
-1
ee/spec/models/issue_spec.rb
ee/spec/models/issue_spec.rb
+1
-1
ee/spec/models/label_note_spec.rb
ee/spec/models/label_note_spec.rb
+5
-5
ee/spec/models/lfs_object_spec.rb
ee/spec/models/lfs_object_spec.rb
+2
-2
ee/spec/models/merge_train_spec.rb
ee/spec/models/merge_train_spec.rb
+1
-1
ee/spec/models/namespace_spec.rb
ee/spec/models/namespace_spec.rb
+3
-3
ee/spec/models/project_repository_state_spec.rb
ee/spec/models/project_repository_state_spec.rb
+2
-2
ee/spec/models/project_services/alerts_service_spec.rb
ee/spec/models/project_services/alerts_service_spec.rb
+1
-1
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+3
-3
ee/spec/models/project_tracing_setting_spec.rb
ee/spec/models/project_tracing_setting_spec.rb
+1
-1
ee/spec/models/prometheus_alert_spec.rb
ee/spec/models/prometheus_alert_spec.rb
+1
-1
ee/spec/models/repository_spec.rb
ee/spec/models/repository_spec.rb
+2
-2
ee/spec/models/scoped_label_set_spec.rb
ee/spec/models/scoped_label_set_spec.rb
+3
-3
ee/spec/models/upload_spec.rb
ee/spec/models/upload_spec.rb
+2
-2
ee/spec/models/vulnerabilities/occurrence_spec.rb
ee/spec/models/vulnerabilities/occurrence_spec.rb
+3
-3
No files found.
ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb
View file @
e4e8f18c
...
...
@@ -6,8 +6,8 @@ describe Gitlab::Geo::LogCursor::Daemon, :clean_gitlab_redis_shared_state do
include
::
EE
::
GeoHelpers
include
ExclusiveLeaseHelpers
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
,
reload:
true
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
,
reload:
true
)
{
create
(
:geo_node
)
}
let
(
:options
)
{
{}
}
subject
(
:daemon
)
{
described_class
.
new
(
options
)
}
...
...
ee/spec/models/alerting/project_alerting_setting_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Alerting
::
ProjectAlertingSetting
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
subject
{
create
(
:project_alerting_setting
,
project:
project
)
}
...
...
ee/spec/models/application_setting_spec.rb
View file @
e4e8f18c
...
...
@@ -267,14 +267,14 @@ describe ApplicationSetting do
where
(
indexing:
[
true
,
false
],
searching:
[
true
,
false
],
limiting:
[
true
,
false
])
with_them
do
set
(
:included_project_container
)
{
create
(
:elasticsearch_indexed_project
)
}
set
(
:included_namespace_container
)
{
create
(
:elasticsearch_indexed_namespace
)
}
let_it_be
(
:included_project_container
)
{
create
(
:elasticsearch_indexed_project
)
}
let_it_be
(
:included_namespace_container
)
{
create
(
:elasticsearch_indexed_namespace
)
}
set
(
:included_project
)
{
included_project_container
.
project
}
set
(
:included_namespace
)
{
included_namespace_container
.
namespace
}
let_it_be
(
:included_project
)
{
included_project_container
.
project
}
let_it_be
(
:included_namespace
)
{
included_namespace_container
.
namespace
}
set
(
:excluded_project
)
{
create
(
:project
)
}
set
(
:excluded_namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:excluded_project
)
{
create
(
:project
)
}
let_it_be
(
:excluded_namespace
)
{
create
(
:namespace
)
}
let
(
:only_when_enabled_globally
)
{
indexing
&&
searching
&&
!
limiting
}
...
...
ee/spec/models/burndown_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Burndown
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:start_date
)
{
"2017-03-01"
}
let
(
:due_date
)
{
"2017-03-03"
}
...
...
@@ -35,7 +35,7 @@ describe Burndown do
end
context
'when issues belong to a public project'
do
set
(
:non_member
)
{
create
(
:user
)
}
let_it_be
(
:non_member
)
{
create
(
:user
)
}
subject
do
project
.
update
(
visibility_level:
Gitlab
::
VisibilityLevel
::
PUBLIC
)
...
...
ee/spec/models/ci/bridge_spec.rb
View file @
e4e8f18c
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
Ci
::
Bridge
do
set
(
:project
)
{
create
(
:project
)
}
set
(
:target_project
)
{
create
(
:project
,
name:
'project'
,
namespace:
create
(
:namespace
,
name:
'my'
))
}
set
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:target_project
)
{
create
(
:project
,
name:
'project'
,
namespace:
create
(
:namespace
,
name:
'my'
))
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:bridge
)
do
create
(
:ci_bridge
,
:variables
,
status: :created
,
...
...
ee/spec/models/ci/build_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Ci
::
Build
do
set
(
:group
)
{
create
(
:group
,
plan: :bronze_plan
)
}
let_it_be
(
:group
)
{
create
(
:group
,
plan: :bronze_plan
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
let
(
:pipeline
)
do
...
...
ee/spec/models/ci/job_artifact_spec.rb
View file @
e4e8f18c
...
...
@@ -6,8 +6,8 @@ describe Ci::JobArtifact do
include
EE
::
GeoHelpers
describe
'#destroy'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
it
'creates a JobArtifactDeletedEvent'
do
stub_current_geo_node
(
primary
)
...
...
ee/spec/models/ci/pipeline_spec.rb
View file @
e4e8f18c
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
describe
Ci
::
Pipeline
do
let
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:pipeline
)
do
create
(
:ci_empty_pipeline
,
status: :created
,
project:
project
)
...
...
ee/spec/models/concerns/elastic/issue_spec.rb
View file @
e4e8f18c
...
...
@@ -11,8 +11,8 @@ describe Issue, :elastic do
let
(
:admin
)
{
create
:user
,
:admin
}
context
'when limited indexing is on'
do
set
(
:project
)
{
create
:project
,
name:
'test1'
}
set
(
:issue
)
{
create
:issue
,
project:
project
}
let_it_be
(
:project
)
{
create
:project
,
name:
'test1'
}
let_it_be
(
:issue
)
{
create
:issue
,
project:
project
}
before
do
stub_ee_application_setting
(
elasticsearch_limit_indexing:
true
)
...
...
@@ -39,7 +39,7 @@ describe Issue, :elastic do
end
context
'when a group is enabled'
do
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
before
do
create
:elasticsearch_indexed_namespace
,
namespace:
group
...
...
ee/spec/models/concerns/elastic/merge_request_spec.rb
View file @
e4e8f18c
...
...
@@ -10,8 +10,8 @@ describe MergeRequest, :elastic do
let
(
:admin
)
{
create
(
:user
,
:admin
)
}
it_behaves_like
'limited indexing is enabled'
do
set
(
:object
)
{
create
:merge_request
,
source_project:
project
}
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:object
)
{
create
:merge_request
,
source_project:
project
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let
(
:group_object
)
do
project
=
create
:project
,
name:
'test1'
,
group:
group
create
:merge_request
,
source_project:
project
...
...
ee/spec/models/concerns/elastic/milestone_spec.rb
View file @
e4e8f18c
...
...
@@ -8,8 +8,8 @@ describe Milestone, :elastic do
end
it_behaves_like
'limited indexing is enabled'
do
set
(
:object
)
{
create
:milestone
,
project:
project
}
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:object
)
{
create
:milestone
,
project:
project
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let
(
:group_object
)
do
project
=
create
:project
,
name:
'test1'
,
group:
group
create
:milestone
,
project:
project
...
...
ee/spec/models/concerns/elastic/note_spec.rb
View file @
e4e8f18c
...
...
@@ -8,8 +8,8 @@ describe Note, :elastic do
end
it_behaves_like
'limited indexing is enabled'
do
set
(
:object
)
{
create
:note
,
project:
project
}
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:object
)
{
create
:note
,
project:
project
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let
(
:group_object
)
do
project
=
create
:project
,
name:
'test1'
,
group:
group
create
:note
,
project:
project
...
...
ee/spec/models/concerns/elastic/project_spec.rb
View file @
e4e8f18c
...
...
@@ -8,7 +8,7 @@ describe Project, :elastic do
end
context
'when limited indexing is on'
do
set
(
:project
)
{
create
:project
,
name:
'test1'
}
let_it_be
(
:project
)
{
create
:project
,
name:
'test1'
}
before
do
stub_ee_application_setting
(
elasticsearch_limit_indexing:
true
)
...
...
@@ -62,7 +62,7 @@ describe Project, :elastic do
end
context
'when a group is enabled'
do
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
before
do
create
:elasticsearch_indexed_namespace
,
namespace:
group
...
...
ee/spec/models/concerns/elastic/project_wiki_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
ProjectWiki
,
:elastic
do
set
(
:project
)
{
create
(
:project
,
:wiki_repo
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:wiki_repo
)
}
before
do
stub_ee_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
...
...
ee/spec/models/design_management/action_spec.rb
View file @
e4e8f18c
...
...
@@ -9,9 +9,9 @@ describe DesignManagement::Action do
describe
'scopes'
do
describe
'.most_recent'
do
set
(
:design_a
)
{
create
(
:design
)
}
set
(
:design_b
)
{
create
(
:design
)
}
set
(
:design_c
)
{
create
(
:design
)
}
let_it_be
(
:design_a
)
{
create
(
:design
)
}
let_it_be
(
:design_b
)
{
create
(
:design
)
}
let_it_be
(
:design_c
)
{
create
(
:design
)
}
let
(
:designs
)
{
[
design_a
,
design_b
,
design_c
]
}
...
...
@@ -35,15 +35,15 @@ describe DesignManagement::Action do
end
describe
'.up_to_version'
do
set
(
:issue
)
{
create
(
:issue
)
}
set
(
:design_a
)
{
create
(
:design
,
issue:
issue
)
}
set
(
:design_b
)
{
create
(
:design
,
issue:
issue
)
}
let_it_be
(
:issue
)
{
create
(
:issue
)
}
let_it_be
(
:design_a
)
{
create
(
:design
,
issue:
issue
)
}
let_it_be
(
:design_b
)
{
create
(
:design
,
issue:
issue
)
}
# let bindings are not available in before(:all) contexts,
# so we need to redefine the array on each construction.
set
(
:oldest
)
{
create
(
:design_version
,
designs:
[
design_a
,
design_b
])
}
set
(
:middle
)
{
create
(
:design_version
,
designs:
[
design_a
,
design_b
])
}
set
(
:newest
)
{
create
(
:design_version
,
designs:
[
design_a
,
design_b
])
}
let_it_be
(
:oldest
)
{
create
(
:design_version
,
designs:
[
design_a
,
design_b
])
}
let_it_be
(
:middle
)
{
create
(
:design_version
,
designs:
[
design_a
,
design_b
])
}
let_it_be
(
:newest
)
{
create
(
:design_version
,
designs:
[
design_a
,
design_b
])
}
subject
{
described_class
.
where
(
design:
issue
.
designs
).
up_to_version
(
version
)
}
...
...
ee/spec/models/design_management/design_at_version_spec.rb
View file @
e4e8f18c
...
...
@@ -5,10 +5,10 @@ require 'spec_helper'
describe
DesignManagement
::
DesignAtVersion
do
include
DesignManagementTestHelpers
set
(
:iss
ue
)
{
create
(
:issue
)
}
set
(
:issue_b
)
{
create
(
:issue
)
}
set
(
:design
)
{
create
(
:design
,
issue:
issue
)
}
set
(
:version
)
{
create
(
:design_version
,
designs:
[
design
])
}
let_it_be
(
:issue
,
reload:
tr
ue
)
{
create
(
:issue
)
}
let_it_be
(
:issue_b
,
reload:
true
)
{
create
(
:issue
)
}
let_it_be
(
:design
,
reload:
true
)
{
create
(
:design
,
issue:
issue
)
}
let_it_be
(
:version
)
{
create
(
:design_version
,
designs:
[
design
])
}
describe
'#id'
do
subject
{
described_class
.
new
(
design:
design
,
version:
version
)
}
...
...
ee/spec/models/design_management/design_collection_spec.rb
View file @
e4e8f18c
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
describe
DesignManagement
::
DesignCollection
do
include
DesignManagementTestHelpers
set
(
:iss
ue
)
{
create
(
:issue
)
}
let_it_be
(
:issue
,
reload:
tr
ue
)
{
create
(
:issue
)
}
subject
(
:collection
)
{
described_class
.
new
(
issue
)
}
...
...
ee/spec/models/design_management/design_spec.rb
View file @
e4e8f18c
...
...
@@ -391,7 +391,7 @@ describe DesignManagement::Design do
end
describe
'#user_notes_count'
,
:use_clean_rails_memory_store_caching
do
set
(
:design
)
{
create
(
:design
,
:with_file
)
}
let_it_be
(
:design
)
{
create
(
:design
,
:with_file
)
}
subject
{
design
.
user_notes_count
}
...
...
ee/spec/models/ee/appearance_spec.rb
View file @
e4e8f18c
...
...
@@ -24,8 +24,8 @@ describe Appearance do
context
'object storage with background upload'
do
context
'when running in a Geo primary node'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
before
do
stub_current_geo_node
(
primary
)
...
...
ee/spec/models/ee/event_spec.rb
View file @
e4e8f18c
...
...
@@ -4,11 +4,11 @@ require 'spec_helper'
describe
Event
do
describe
'#visible_to_user?'
do
set
(
:non_member
)
{
create
(
:user
)
}
set
(
:member
)
{
create
(
:user
)
}
set
(
:guest
)
{
create
(
:user
)
}
set
(
:author
)
{
create
(
:author
)
}
set
(
:admin
)
{
create
(
:admin
)
}
let_it_be
(
:non_member
)
{
create
(
:user
)
}
let_it_be
(
:member
)
{
create
(
:user
)
}
let_it_be
(
:guest
)
{
create
(
:user
)
}
let_it_be
(
:author
)
{
create
(
:author
)
}
let_it_be
(
:admin
)
{
create
(
:admin
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
,
author:
author
)
}
let
(
:note_on_epic
)
{
create
(
:note
,
:on_epic
,
noteable:
epic
)
}
let
(
:event
)
{
described_class
.
new
(
group:
group
,
target:
target
,
author:
author
)
}
...
...
ee/spec/models/ee/note_spec.rb
View file @
e4e8f18c
...
...
@@ -59,8 +59,8 @@ describe Note do
end
context
'when running in a Geo primary node'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
before
do
stub_current_geo_node
(
primary
)
...
...
ee/spec/models/geo/container_repository_registry_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Geo
::
ContainerRepositoryRegistry
,
:geo
do
set
(
:registry
)
{
create
(
:container_repository_registry
)
}
let_it_be
(
:registry
)
{
create
(
:container_repository_registry
)
}
describe
'relationships'
do
it
{
is_expected
.
to
belong_to
(
:container_repository
)
}
...
...
ee/spec/models/incident_management/project_incident_management_setting_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
IncidentManagement
::
ProjectIncidentManagementSetting
do
set
(
:project
)
{
create
(
:project
,
:repository
,
create_templates: :issue
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
create_templates: :issue
)
}
describe
'Associations'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
...
...
ee/spec/models/issue_spec.rb
View file @
e4e8f18c
...
...
@@ -9,7 +9,7 @@ describe Issue do
context
'callbacks'
do
describe
'.after_create'
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:author
)
{
User
.
alert_bot
}
context
'when issue title is "New: Incident"'
do
...
...
ee/spec/models/label_note_spec.rb
View file @
e4e8f18c
...
...
@@ -5,12 +5,12 @@ require 'spec_helper'
describe
LabelNote
do
include
Gitlab
::
Routing
.
url_helpers
set
(
:group
)
{
create
(
:group
)
}
set
(
:user
)
{
create
(
:user
)
}
set
(
:label
)
{
create
(
:group_label
,
group:
group
)
}
set
(
:label2
)
{
create
(
:group_label
,
group:
group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:label
)
{
create
(
:group_label
,
group:
group
)
}
let_it_be
(
:label2
)
{
create
(
:group_label
,
group:
group
)
}
let
(
:resource_parent
)
{
group
}
set
(
:resource
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:resource
)
{
create
(
:epic
,
group:
group
)
}
let
(
:project
)
{
nil
}
let
(
:resource_key
)
{
resource
.
class
.
name
.
underscore
.
to_s
}
let
(
:events
)
{
[
create
(
:resource_label_event
,
label:
label
,
resource_key
=>
resource
)]
}
...
...
ee/spec/models/lfs_object_spec.rb
View file @
e4e8f18c
...
...
@@ -9,8 +9,8 @@ describe LfsObject do
subject
{
create
(
:lfs_object
,
:with_file
)
}
context
'when running in a Geo primary node'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
it
'logs an event to the Geo event log'
do
stub_current_geo_node
(
primary
)
...
...
ee/spec/models/merge_train_spec.rb
View file @
e4e8f18c
...
...
@@ -5,7 +5,7 @@ require "spec_helper"
describe
MergeTrain
do
include
ProjectForksHelper
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
it
{
is_expected
.
to
belong_to
(
:merge_request
)
}
it
{
is_expected
.
to
belong_to
(
:user
)
}
...
...
ee/spec/models/namespace_spec.rb
View file @
e4e8f18c
...
...
@@ -139,7 +139,7 @@ describe Namespace do
end
context
'when group is subgroup'
do
set
(
:root_ancestor
)
{
create
(
:group
)
}
let_it_be
(
:root_ancestor
)
{
create
(
:group
)
}
let
(
:namespace
)
{
create
(
:namespace
,
parent:
root_ancestor
)
}
it
'is invalid'
do
...
...
@@ -159,8 +159,8 @@ describe Namespace do
describe
'#move_dir'
do
context
'when running on a primary node'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
let
(
:gitlab_shell
)
{
Gitlab
::
Shell
.
new
}
let
(
:parent_group
)
{
create
(
:group
)
}
let
(
:child_group
)
{
create
(
:group
,
name:
'child'
,
path:
'child'
,
parent:
parent_group
)
}
...
...
ee/spec/models/project_repository_state_spec.rb
View file @
e4e8f18c
...
...
@@ -5,8 +5,8 @@ require 'spec_helper'
describe
ProjectRepositoryState
do
using
RSpec
::
Parameterized
::
TableSyntax
set
(
:project
)
{
create
(
:project
)
}
set
(
:repository_state
)
{
create
(
:repository_state
,
project_id:
project
.
id
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:repository_state
)
{
create
(
:repository_state
,
project_id:
project
.
id
)
}
subject
{
repository_state
}
...
...
ee/spec/models/project_services/alerts_service_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
AlertsService
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:service_params
)
{
{
project:
project
,
active:
active
}
}
let
(
:active
)
{
true
}
let
(
:service
)
{
described_class
.
new
(
service_params
)
}
...
...
ee/spec/models/project_spec.rb
View file @
e4e8f18c
...
...
@@ -423,7 +423,7 @@ describe Project do
end
describe
'#environments_for_scope'
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
)
}
before
do
create_list
(
:environment
,
2
,
project:
project
)
...
...
@@ -784,8 +784,8 @@ describe Project do
end
describe
'#shared_runners_limit_namespace'
do
set
(
:root_ancestor
)
{
create
(
:group
)
}
set
(
:group
)
{
create
(
:group
,
parent:
root_ancestor
)
}
let_it_be
(
:root_ancestor
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
,
parent:
root_ancestor
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
subject
{
project
.
shared_runners_limit_namespace
}
...
...
ee/spec/models/project_tracing_setting_spec.rb
View file @
e4e8f18c
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
describe
ProjectTracingSetting
do
describe
'#external_url'
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:tracing_setting
)
{
project
.
build_tracing_setting
}
...
...
ee/spec/models/prometheus_alert_spec.rb
View file @
e4e8f18c
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
PrometheusAlert
do
set
(
:project
)
{
build
(
:project
)
}
let_it_be
(
:project
)
{
build
(
:project
)
}
let
(
:metric
)
{
build
(
:prometheus_metric
)
}
describe
'.distinct_projects'
do
...
...
ee/spec/models/repository_spec.rb
View file @
e4e8f18c
...
...
@@ -9,8 +9,8 @@ describe Repository do
TestBlob
=
Struct
.
new
(
:path
)
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
...
...
ee/spec/models/scoped_label_set_spec.rb
View file @
e4e8f18c
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
ScopedLabelSet
do
set
(
:kv_label1
)
{
create
(
:label
,
title:
'key::label1'
)
}
set
(
:kv_label2
)
{
create
(
:label
,
title:
'key::label2'
)
}
set
(
:kv_label3
)
{
create
(
:label
,
title:
'key::label3'
)
}
let_it_be
(
:kv_label1
)
{
create
(
:label
,
title:
'key::label1'
)
}
let_it_be
(
:kv_label2
)
{
create
(
:label
,
title:
'key::label2'
)
}
let_it_be
(
:kv_label3
)
{
create
(
:label
,
title:
'key::label3'
)
}
describe
'.from_label_ids'
do
def
get_labels
(
sets
,
key
)
...
...
ee/spec/models/upload_spec.rb
View file @
e4e8f18c
...
...
@@ -9,8 +9,8 @@ describe Upload do
subject
{
create
(
:upload
,
checksum:
'8710d2c16809c79fee211a9693b64038a8aae99561bc86ce98a9b46b45677fe4'
)
}
context
'when running in a Geo primary node'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
it
'logs an event to the Geo event log'
do
stub_current_geo_node
(
primary
)
...
...
ee/spec/models/vulnerabilities/occurrence_spec.rb
View file @
e4e8f18c
...
...
@@ -281,8 +281,8 @@ describe Vulnerabilities::Occurrence do
end
describe
'.undismissed'
do
set
(
:project
)
{
create
(
:project
)
}
set
(
:project2
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
)
}
let!
(
:finding1
)
{
create
(
:vulnerabilities_occurrence
,
project:
project
)
}
let!
(
:finding2
)
{
create
(
:vulnerabilities_occurrence
,
project:
project
,
report_type: :dast
)
}
let!
(
:finding3
)
{
create
(
:vulnerabilities_occurrence
,
project:
project2
)
}
...
...
@@ -419,7 +419,7 @@ describe Vulnerabilities::Occurrence do
end
describe
'feedback'
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:occurrence
)
do
create
(
:vulnerabilities_occurrence
,
...
...
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