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
c202da25
Commit
c202da25
authored
Jan 21, 2022
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace owner with first_owner in lib specs
parent
2f33a8cb
Changes
57
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
69 additions
and
69 deletions
+69
-69
spec/lib/api/entities/basic_project_details_spec.rb
spec/lib/api/entities/basic_project_details_spec.rb
+1
-1
spec/lib/api/helpers_spec.rb
spec/lib/api/helpers_spec.rb
+1
-1
spec/lib/backup/gitaly_backup_spec.rb
spec/lib/backup/gitaly_backup_spec.rb
+3
-3
spec/lib/backup/gitaly_rpc_backup_spec.rb
spec/lib/backup/gitaly_rpc_backup_spec.rb
+3
-3
spec/lib/backup/repositories_spec.rb
spec/lib/backup/repositories_spec.rb
+3
-3
spec/lib/banzai/filter/references/issue_reference_filter_spec.rb
...b/banzai/filter/references/issue_reference_filter_spec.rb
+1
-1
spec/lib/banzai/object_renderer_spec.rb
spec/lib/banzai/object_renderer_spec.rb
+1
-1
spec/lib/feature_spec.rb
spec/lib/feature_spec.rb
+2
-2
spec/lib/gitlab/ci/config/external/rules_spec.rb
spec/lib/gitlab/ci/config/external/rules_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/5_minute_production_app_ci_yaml_spec.rb
...tlab/ci/templates/5_minute_production_app_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/AWS/deploy_ecs_gitlab_ci_yaml_spec.rb
...gitlab/ci/templates/AWS/deploy_ecs_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Jobs/build_gitlab_ci_yaml_spec.rb
...lib/gitlab/ci/templates/Jobs/build_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb
...lab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Jobs/deploy_gitlab_ci_yaml_spec.rb
...ib/gitlab/ci/templates/Jobs/deploy_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb
.../gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb
.../lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Terraform/base_gitlab_ci_yaml_spec.rb
...gitlab/ci/templates/Terraform/base_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Terraform/base_latest_gitlab_ci_yaml_spec.rb
...ci/templates/Terraform/base_latest_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/Verify/load_performance_testing_gitlab_ci_yaml_spec.rb
...es/Verify/load_performance_testing_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb
...ib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb
+2
-2
spec/lib/gitlab/ci/templates/flutter_gitlab_ci_yaml_spec.rb
spec/lib/gitlab/ci/templates/flutter_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/kaniko_gitlab_ci_yaml_spec.rb
spec/lib/gitlab/ci/templates/kaniko_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/npm_spec.rb
spec/lib/gitlab/ci/templates/npm_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/terraform_gitlab_ci_yaml_spec.rb
.../lib/gitlab/ci/templates/terraform_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/templates/terraform_latest_gitlab_ci_yaml_spec.rb
...tlab/ci/templates/terraform_latest_gitlab_ci_yaml_spec.rb
+1
-1
spec/lib/gitlab/ci/variables/builder_spec.rb
spec/lib/gitlab/ci/variables/builder_spec.rb
+1
-1
spec/lib/gitlab/diff/file_spec.rb
spec/lib/gitlab/diff/file_spec.rb
+3
-3
spec/lib/gitlab/diff/position_tracer/image_strategy_spec.rb
spec/lib/gitlab/diff/position_tracer/image_strategy_spec.rb
+1
-1
spec/lib/gitlab/diff/position_tracer/line_strategy_spec.rb
spec/lib/gitlab/diff/position_tracer/line_strategy_spec.rb
+1
-1
spec/lib/gitlab/diff/position_tracer_spec.rb
spec/lib/gitlab/diff/position_tracer_spec.rb
+1
-1
spec/lib/gitlab/git/wiki_spec.rb
spec/lib/gitlab/git/wiki_spec.rb
+1
-1
spec/lib/gitlab/git_access_design_spec.rb
spec/lib/gitlab/git_access_design_spec.rb
+1
-1
spec/lib/gitlab/gl_repository/identifier_spec.rb
spec/lib/gitlab/gl_repository/identifier_spec.rb
+2
-2
spec/lib/gitlab/gl_repository/repo_type_spec.rb
spec/lib/gitlab/gl_repository/repo_type_spec.rb
+2
-2
spec/lib/gitlab/graphql/markdown_field_spec.rb
spec/lib/gitlab/graphql/markdown_field_spec.rb
+1
-1
spec/lib/gitlab/project_authorizations_spec.rb
spec/lib/gitlab/project_authorizations_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/analytics_menu_spec.rb
spec/lib/sidebars/projects/menus/analytics_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/ci_cd_menu_spec.rb
spec/lib/sidebars/projects/menus/ci_cd_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/confluence_menu_spec.rb
spec/lib/sidebars/projects/menus/confluence_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/deployments_menu_spec.rb
spec/lib/sidebars/projects/menus/deployments_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/external_issue_tracker_menu_spec.rb
...debars/projects/menus/external_issue_tracker_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/external_wiki_menu_spec.rb
spec/lib/sidebars/projects/menus/external_wiki_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/hidden_menu_spec.rb
spec/lib/sidebars/projects/menus/hidden_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb
spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/invite_team_members_menu_spec.rb
.../sidebars/projects/menus/invite_team_members_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/issues_menu_spec.rb
spec/lib/sidebars/projects/menus/issues_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb
spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/monitor_menu_spec.rb
spec/lib/sidebars/projects/menus/monitor_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/packages_registries_menu_spec.rb
.../sidebars/projects/menus/packages_registries_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/project_information_menu_spec.rb
.../sidebars/projects/menus/project_information_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/repository_menu_spec.rb
spec/lib/sidebars/projects/menus/repository_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/scope_menu_spec.rb
spec/lib/sidebars/projects/menus/scope_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/security_compliance_menu_spec.rb
.../sidebars/projects/menus/security_compliance_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/settings_menu_spec.rb
spec/lib/sidebars/projects/menus/settings_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/shimo_menu_spec.rb
spec/lib/sidebars/projects/menus/shimo_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/snippets_menu_spec.rb
spec/lib/sidebars/projects/menus/snippets_menu_spec.rb
+1
-1
spec/lib/sidebars/projects/menus/wiki_menu_spec.rb
spec/lib/sidebars/projects/menus/wiki_menu_spec.rb
+1
-1
No files found.
spec/lib/api/entities/basic_project_details_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
API
::
Entities
::
BasicProjectDetails
do
RSpec
.
describe
API
::
Entities
::
BasicProjectDetails
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
subject
(
:output
)
{
described_class
.
new
(
project
,
current_user:
current_user
).
as_json
}
subject
(
:output
)
{
described_class
.
new
(
project
,
current_user:
current_user
).
as_json
}
...
...
spec/lib/api/helpers_spec.rb
View file @
c202da25
...
@@ -160,7 +160,7 @@ RSpec.describe API::Helpers do
...
@@ -160,7 +160,7 @@ RSpec.describe API::Helpers do
describe
'#find_project!'
do
describe
'#find_project!'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
before
do
allow
(
subject
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
subject
).
to
receive
(
:current_user
).
and_return
(
user
)
...
...
spec/lib/backup/gitaly_backup_spec.rb
View file @
c202da25
...
@@ -38,7 +38,7 @@ RSpec.describe Backup::GitalyBackup do
...
@@ -38,7 +38,7 @@ RSpec.describe Backup::GitalyBackup do
create
(
:wiki_page
,
container:
project
)
create
(
:wiki_page
,
container:
project
)
create
(
:design
,
:with_file
,
issue:
create
(
:issue
,
project:
project
))
create
(
:design
,
:with_file
,
issue:
create
(
:issue
,
project:
project
))
project_snippet
=
create
(
:project_snippet
,
:repository
,
project:
project
)
project_snippet
=
create
(
:project_snippet
,
:repository
,
project:
project
)
personal_snippet
=
create
(
:personal_snippet
,
:repository
,
author:
project
.
owner
)
personal_snippet
=
create
(
:personal_snippet
,
:repository
,
author:
project
.
first_
owner
)
expect
(
Open3
).
to
receive
(
:popen2
).
with
(
expected_env
,
anything
,
'create'
,
'-path'
,
anything
).
and_call_original
expect
(
Open3
).
to
receive
(
:popen2
).
with
(
expected_env
,
anything
,
'create'
,
'-path'
,
anything
).
and_call_original
...
@@ -122,8 +122,8 @@ RSpec.describe Backup::GitalyBackup do
...
@@ -122,8 +122,8 @@ RSpec.describe Backup::GitalyBackup do
context
'restore'
do
context
'restore'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
owner
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
first_
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
first_
owner
)
}
def
copy_bundle_to_backup_path
(
bundle_name
,
destination
)
def
copy_bundle_to_backup_path
(
bundle_name
,
destination
)
FileUtils
.
mkdir_p
(
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
'repositories'
,
File
.
dirname
(
destination
)))
FileUtils
.
mkdir_p
(
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
'repositories'
,
File
.
dirname
(
destination
)))
...
...
spec/lib/backup/gitaly_rpc_backup_spec.rb
View file @
c202da25
...
@@ -25,7 +25,7 @@ RSpec.describe Backup::GitalyRpcBackup do
...
@@ -25,7 +25,7 @@ RSpec.describe Backup::GitalyRpcBackup do
create
(
:wiki_page
,
container:
project
)
create
(
:wiki_page
,
container:
project
)
create
(
:design
,
:with_file
,
issue:
create
(
:issue
,
project:
project
))
create
(
:design
,
:with_file
,
issue:
create
(
:issue
,
project:
project
))
project_snippet
=
create
(
:project_snippet
,
:repository
,
project:
project
)
project_snippet
=
create
(
:project_snippet
,
:repository
,
project:
project
)
personal_snippet
=
create
(
:personal_snippet
,
:repository
,
author:
project
.
owner
)
personal_snippet
=
create
(
:personal_snippet
,
:repository
,
author:
project
.
first_
owner
)
subject
.
start
(
:create
)
subject
.
start
(
:create
)
subject
.
enqueue
(
project
,
Gitlab
::
GlRepository
::
PROJECT
)
subject
.
enqueue
(
project
,
Gitlab
::
GlRepository
::
PROJECT
)
...
@@ -75,8 +75,8 @@ RSpec.describe Backup::GitalyRpcBackup do
...
@@ -75,8 +75,8 @@ RSpec.describe Backup::GitalyRpcBackup do
context
'restore'
do
context
'restore'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
owner
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
first_
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
first_
owner
)
}
def
copy_bundle_to_backup_path
(
bundle_name
,
destination
)
def
copy_bundle_to_backup_path
(
bundle_name
,
destination
)
FileUtils
.
mkdir_p
(
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
'repositories'
,
File
.
dirname
(
destination
)))
FileUtils
.
mkdir_p
(
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
'repositories'
,
File
.
dirname
(
destination
)))
...
...
spec/lib/backup/repositories_spec.rb
View file @
c202da25
...
@@ -15,7 +15,7 @@ RSpec.describe Backup::Repositories do
...
@@ -15,7 +15,7 @@ RSpec.describe Backup::Repositories do
RSpec
.
shared_examples
'creates repository bundles'
do
RSpec
.
shared_examples
'creates repository bundles'
do
it
'calls enqueue for each repository type'
,
:aggregate_failures
do
it
'calls enqueue for each repository type'
,
:aggregate_failures
do
project_snippet
=
create
(
:project_snippet
,
:repository
,
project:
project
)
project_snippet
=
create
(
:project_snippet
,
:repository
,
project:
project
)
personal_snippet
=
create
(
:personal_snippet
,
:repository
,
author:
project
.
owner
)
personal_snippet
=
create
(
:personal_snippet
,
:repository
,
author:
project
.
first_
owner
)
subject
.
dump
(
max_concurrency:
1
,
max_storage_concurrency:
1
)
subject
.
dump
(
max_concurrency:
1
,
max_storage_concurrency:
1
)
...
@@ -172,8 +172,8 @@ RSpec.describe Backup::Repositories do
...
@@ -172,8 +172,8 @@ RSpec.describe Backup::Repositories do
describe
'#restore'
do
describe
'#restore'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
owner
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
first_
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
first_
owner
)
}
it
'calls enqueue for each repository type'
,
:aggregate_failures
do
it
'calls enqueue for each repository type'
,
:aggregate_failures
do
subject
.
restore
subject
.
restore
...
...
spec/lib/banzai/filter/references/issue_reference_filter_spec.rb
View file @
c202da25
...
@@ -515,7 +515,7 @@ RSpec.describe Banzai::Filter::References::IssueReferenceFilter do
...
@@ -515,7 +515,7 @@ RSpec.describe Banzai::Filter::References::IssueReferenceFilter do
enable_design_management
(
enabled
)
enable_design_management
(
enabled
)
end
end
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:enabled
)
{
true
}
let
(
:enabled
)
{
true
}
let
(
:matches
)
{
Issue
.
link_reference_pattern
.
match
(
input_text
)
}
let
(
:matches
)
{
Issue
.
link_reference_pattern
.
match
(
input_text
)
}
let
(
:extras
)
{
subject
.
object_link_text_extras
(
issue
,
matches
)
}
let
(
:extras
)
{
subject
.
object_link_text_extras
(
issue
,
matches
)
}
...
...
spec/lib/banzai/object_renderer_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Banzai
::
ObjectRenderer
do
RSpec
.
describe
Banzai
::
ObjectRenderer
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:renderer
)
do
let
(
:renderer
)
do
described_class
.
new
(
described_class
.
new
(
default_project:
project
,
default_project:
project
,
...
...
spec/lib/feature_spec.rb
View file @
c202da25
...
@@ -728,13 +728,13 @@ RSpec.describe Feature, stub_feature_flags: false do
...
@@ -728,13 +728,13 @@ RSpec.describe Feature, stub_feature_flags: false do
describe
'#targets'
do
describe
'#targets'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:user_name
)
{
project
.
owner
.
username
}
let
(
:user_name
)
{
project
.
first_
owner
.
username
}
subject
{
described_class
.
new
(
user:
user_name
,
project:
project
.
full_path
,
group:
group
.
full_path
)
}
subject
{
described_class
.
new
(
user:
user_name
,
project:
project
.
full_path
,
group:
group
.
full_path
)
}
it
'returns all found targets'
do
it
'returns all found targets'
do
expect
(
subject
.
targets
).
to
be_an
(
Array
)
expect
(
subject
.
targets
).
to
be_an
(
Array
)
expect
(
subject
.
targets
).
to
eq
([
project
.
owner
,
project
,
group
])
expect
(
subject
.
targets
).
to
eq
([
project
.
first_
owner
,
project
,
group
])
end
end
end
end
end
end
...
...
spec/lib/gitlab/ci/config/external/rules_spec.rb
View file @
c202da25
...
@@ -45,7 +45,7 @@ RSpec.describe Gitlab::Ci::Config::External::Rules do
...
@@ -45,7 +45,7 @@ RSpec.describe Gitlab::Ci::Config::External::Rules do
let
(
:context
)
{
double
(
project:
project
,
sha:
project
.
repository
.
tree
.
sha
,
top_level_worktree_paths:
[
'Dockerfile'
])
}
let
(
:context
)
{
double
(
project:
project
,
sha:
project
.
repository
.
tree
.
sha
,
top_level_worktree_paths:
[
'Dockerfile'
])
}
before
do
before
do
project
.
repository
.
create_file
(
project
.
owner
,
'Dockerfile'
,
"commit"
,
message:
'test'
,
branch_name:
"master"
)
project
.
repository
.
create_file
(
project
.
first_
owner
,
'Dockerfile'
,
"commit"
,
message:
'test'
,
branch_name:
"master"
)
end
end
it
{
is_expected
.
to
eq
(
true
)
}
it
{
is_expected
.
to
eq
(
true
)
}
...
...
spec/lib/gitlab/ci/templates/5_minute_production_app_ci_yaml_spec.rb
View file @
c202da25
...
@@ -8,7 +8,7 @@ RSpec.describe '5-Minute-Production-App.gitlab-ci.yml' do
...
@@ -8,7 +8,7 @@ RSpec.describe '5-Minute-Production-App.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let_it_be
(
:project
)
{
create
(
:project
,
:auto_devops
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let_it_be
(
:project
)
{
create
(
:project
,
:auto_devops
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
...
...
spec/lib/gitlab/ci/templates/AWS/deploy_ecs_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -9,7 +9,7 @@ RSpec.describe 'Deploy-ECS.gitlab-ci.yml' do
...
@@ -9,7 +9,7 @@ RSpec.describe 'Deploy-ECS.gitlab-ci.yml' do
let
(
:default_branch
)
{
project
.
default_branch_or_main
}
let
(
:default_branch
)
{
project
.
default_branch_or_main
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:project
)
{
create
(
:project
,
:auto_devops
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:project
)
{
create
(
:project
,
:auto_devops
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/templates/Jobs/build_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/Build.gitlab-ci.yml' do
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/Build.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_ref
)
{
default_branch
}
let
(
:pipeline_ref
)
{
default_branch
}
...
...
spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/Code-Quality.gitlab-ci.yml' do
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/Code-Quality.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_ref
)
{
default_branch
}
let
(
:pipeline_ref
)
{
default_branch
}
...
...
spec/lib/gitlab/ci/templates/Jobs/deploy_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -29,7 +29,7 @@ RSpec.describe 'Jobs/Deploy.gitlab-ci.yml' do
...
@@ -29,7 +29,7 @@ RSpec.describe 'Jobs/Deploy.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let_it_be
(
:project
,
refind:
true
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
,
refind:
true
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_ref
)
{
default_branch
}
let
(
:pipeline_ref
)
{
default_branch
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_ref
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_ref
)
}
...
...
spec/lib/gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/SAST-IaC.latest.gitlab-ci.yml' do
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/SAST-IaC.latest.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let
(
:default_branch
)
{
'main'
}
let
(
:default_branch
)
{
'main'
}
let
(
:pipeline_ref
)
{
default_branch
}
let
(
:pipeline_ref
)
{
default_branch
}
...
...
spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/Test.gitlab-ci.yml' do
...
@@ -7,7 +7,7 @@ RSpec.describe 'Jobs/Test.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_ref
)
{
default_branch
}
let
(
:pipeline_ref
)
{
default_branch
}
...
...
spec/lib/gitlab/ci/templates/Terraform/base_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -9,7 +9,7 @@ RSpec.describe 'Terraform/Base.gitlab-ci.yml' do
...
@@ -9,7 +9,7 @@ RSpec.describe 'Terraform/Base.gitlab-ci.yml' do
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/templates/Terraform/base_latest_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -9,7 +9,7 @@ RSpec.describe 'Terraform/Base.latest.gitlab-ci.yml' do
...
@@ -9,7 +9,7 @@ RSpec.describe 'Terraform/Base.latest.gitlab-ci.yml' do
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/templates/Verify/load_performance_testing_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -20,7 +20,7 @@ RSpec.describe 'Verify/Load-Performance-Testing.gitlab-ci.yml' do
...
@@ -20,7 +20,7 @@ RSpec.describe 'Verify/Load-Performance-Testing.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:default_branch
)
{
'master'
}
let
(
:default_branch
)
{
'master'
}
let
(
:pipeline_ref
)
{
default_branch
}
let
(
:pipeline_ref
)
{
default_branch
}
...
...
spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -15,7 +15,7 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
...
@@ -15,7 +15,7 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:project
)
{
create
(
:project
,
:auto_devops
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:project
)
{
create
(
:project
,
:auto_devops
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
@@ -276,7 +276,7 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
...
@@ -276,7 +276,7 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
with_them
do
with_them
do
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
files
)
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
files
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
default_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
default_branch
)
}
let
(
:pipeline
)
{
service
.
execute
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/templates/flutter_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -8,7 +8,7 @@ RSpec.describe 'Flutter.gitlab-ci.yml' do
...
@@ -8,7 +8,7 @@ RSpec.describe 'Flutter.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let
(
:pipeline_branch
)
{
'master'
}
let
(
:pipeline_branch
)
{
'master'
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/templates/kaniko_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -8,7 +8,7 @@ RSpec.describe 'Kaniko.gitlab-ci.yml' do
...
@@ -8,7 +8,7 @@ RSpec.describe 'Kaniko.gitlab-ci.yml' do
describe
'the created pipeline'
do
describe
'the created pipeline'
do
let
(
:pipeline_branch
)
{
'master'
}
let
(
:pipeline_branch
)
{
'master'
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'Dockerfile'
=>
'FROM alpine:latest'
})
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'Dockerfile'
=>
'FROM alpine:latest'
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/templates/npm_spec.rb
View file @
c202da25
...
@@ -9,7 +9,7 @@ RSpec.describe 'npm.gitlab-ci.yml' do
...
@@ -9,7 +9,7 @@ RSpec.describe 'npm.gitlab-ci.yml' do
let
(
:repo_files
)
{
{
'package.json'
=>
'{}'
,
'README.md'
=>
''
}
}
let
(
:repo_files
)
{
{
'package.json'
=>
'{}'
,
'README.md'
=>
''
}
}
let
(
:modified_files
)
{
%w[package.json]
}
let
(
:modified_files
)
{
%w[package.json]
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
repo_files
)
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
repo_files
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:pipeline_branch
)
{
project
.
default_branch
}
let
(
:pipeline_branch
)
{
project
.
default_branch
}
let
(
:pipeline_tag
)
{
'v1.2.1'
}
let
(
:pipeline_tag
)
{
'v1.2.1'
}
let
(
:pipeline_ref
)
{
pipeline_branch
}
let
(
:pipeline_ref
)
{
pipeline_branch
}
...
...
spec/lib/gitlab/ci/templates/terraform_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -13,7 +13,7 @@ RSpec.describe 'Terraform.gitlab-ci.yml' do
...
@@ -13,7 +13,7 @@ RSpec.describe 'Terraform.gitlab-ci.yml' do
let
(
:default_branch
)
{
project
.
default_branch_or_main
}
let
(
:default_branch
)
{
project
.
default_branch_or_main
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/templates/terraform_latest_gitlab_ci_yaml_spec.rb
View file @
c202da25
...
@@ -13,7 +13,7 @@ RSpec.describe 'Terraform.latest.gitlab-ci.yml' do
...
@@ -13,7 +13,7 @@ RSpec.describe 'Terraform.latest.gitlab-ci.yml' do
let
(
:default_branch
)
{
project
.
default_branch_or_main
}
let
(
:default_branch
)
{
project
.
default_branch_or_main
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:pipeline_branch
)
{
default_branch
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:project
)
{
create
(
:project
,
:custom_repo
,
files:
{
'README.md'
=>
''
})
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:service
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
pipeline_branch
)
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:pipeline
)
{
service
.
execute!
(
:push
).
payload
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
let
(
:build_names
)
{
pipeline
.
builds
.
pluck
(
:name
)
}
...
...
spec/lib/gitlab/ci/variables/builder_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Gitlab
::
Ci
::
Variables
::
Builder
do
RSpec
.
describe
Gitlab
::
Ci
::
Variables
::
Builder
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:job
)
do
let_it_be
(
:job
)
do
create
(
:ci_build
,
create
(
:ci_build
,
pipeline:
pipeline
,
pipeline:
pipeline
,
...
...
spec/lib/gitlab/diff/file_spec.rb
View file @
c202da25
...
@@ -13,7 +13,7 @@ RSpec.describe Gitlab::Diff::File do
...
@@ -13,7 +13,7 @@ RSpec.describe Gitlab::Diff::File do
def
create_file
(
file_name
,
content
)
def
create_file
(
file_name
,
content
)
Files
::
CreateService
.
new
(
Files
::
CreateService
.
new
(
project
,
project
,
project
.
owner
,
project
.
first_
owner
,
commit_message:
'Update'
,
commit_message:
'Update'
,
start_branch:
branch_name
,
start_branch:
branch_name
,
branch_name:
branch_name
,
branch_name:
branch_name
,
...
@@ -27,7 +27,7 @@ RSpec.describe Gitlab::Diff::File do
...
@@ -27,7 +27,7 @@ RSpec.describe Gitlab::Diff::File do
def
update_file
(
file_name
,
content
)
def
update_file
(
file_name
,
content
)
Files
::
UpdateService
.
new
(
Files
::
UpdateService
.
new
(
project
,
project
,
project
.
owner
,
project
.
first_
owner
,
commit_message:
'Update'
,
commit_message:
'Update'
,
start_branch:
branch_name
,
start_branch:
branch_name
,
branch_name:
branch_name
,
branch_name:
branch_name
,
...
@@ -41,7 +41,7 @@ RSpec.describe Gitlab::Diff::File do
...
@@ -41,7 +41,7 @@ RSpec.describe Gitlab::Diff::File do
def
delete_file
(
file_name
)
def
delete_file
(
file_name
)
Files
::
DeleteService
.
new
(
Files
::
DeleteService
.
new
(
project
,
project
,
project
.
owner
,
project
.
first_
owner
,
commit_message:
'Update'
,
commit_message:
'Update'
,
start_branch:
branch_name
,
start_branch:
branch_name
,
branch_name:
branch_name
,
branch_name:
branch_name
,
...
...
spec/lib/gitlab/diff/position_tracer/image_strategy_spec.rb
View file @
c202da25
...
@@ -6,7 +6,7 @@ RSpec.describe Gitlab::Diff::PositionTracer::ImageStrategy do
...
@@ -6,7 +6,7 @@ RSpec.describe Gitlab::Diff::PositionTracer::ImageStrategy do
include
PositionTracerHelpers
include
PositionTracerHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:file_name
)
{
'test-file'
}
let
(
:file_name
)
{
'test-file'
}
let
(
:new_file_name
)
{
"
#{
file_name
}
-new"
}
let
(
:new_file_name
)
{
"
#{
file_name
}
-new"
}
let
(
:second_file_name
)
{
"
#{
file_name
}
-2"
}
let
(
:second_file_name
)
{
"
#{
file_name
}
-2"
}
...
...
spec/lib/gitlab/diff/position_tracer/line_strategy_spec.rb
View file @
c202da25
...
@@ -55,7 +55,7 @@ RSpec.describe Gitlab::Diff::PositionTracer::LineStrategy, :clean_gitlab_redis_c
...
@@ -55,7 +55,7 @@ RSpec.describe Gitlab::Diff::PositionTracer::LineStrategy, :clean_gitlab_redis_c
include
PositionTracerHelpers
include
PositionTracerHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:repository
)
{
project
.
repository
}
let
(
:repository
)
{
project
.
repository
}
let
(
:file_name
)
{
"test-file"
}
let
(
:file_name
)
{
"test-file"
}
let
(
:new_file_name
)
{
"
#{
file_name
}
-new"
}
let
(
:new_file_name
)
{
"
#{
file_name
}
-new"
}
...
...
spec/lib/gitlab/diff/position_tracer_spec.rb
View file @
c202da25
...
@@ -52,7 +52,7 @@ RSpec.describe Gitlab::Diff::PositionTracer do
...
@@ -52,7 +52,7 @@ RSpec.describe Gitlab::Diff::PositionTracer do
describe
'diffs methods'
do
describe
'diffs methods'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:old_diff_refs
)
do
let
(
:old_diff_refs
)
do
diff_refs
(
diff_refs
(
...
...
spec/lib/gitlab/git/wiki_spec.rb
View file @
c202da25
...
@@ -6,7 +6,7 @@ RSpec.describe Gitlab::Git::Wiki do
...
@@ -6,7 +6,7 @@ RSpec.describe Gitlab::Git::Wiki do
using
RSpec
::
Parameterized
::
TableSyntax
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:project_wiki
)
{
ProjectWiki
.
new
(
project
,
user
)
}
let
(
:project_wiki
)
{
ProjectWiki
.
new
(
project
,
user
)
}
subject
(
:wiki
)
{
project_wiki
.
wiki
}
subject
(
:wiki
)
{
project_wiki
.
wiki
}
...
...
spec/lib/gitlab/git_access_design_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ RSpec.describe Gitlab::GitAccessDesign do
...
@@ -5,7 +5,7 @@ RSpec.describe Gitlab::GitAccessDesign do
include
DesignManagementTestHelpers
include
DesignManagementTestHelpers
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let
(
:protocol
)
{
'web'
}
let
(
:protocol
)
{
'web'
}
let
(
:actor
)
{
user
}
let
(
:actor
)
{
user
}
...
...
spec/lib/gitlab/gl_repository/identifier_spec.rb
View file @
c202da25
...
@@ -4,8 +4,8 @@ require 'spec_helper'
...
@@ -4,8 +4,8 @@ require 'spec_helper'
RSpec
.
describe
Gitlab
::
GlRepository
::
Identifier
do
RSpec
.
describe
Gitlab
::
GlRepository
::
Identifier
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
owner
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
first_
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
first_
owner
)
}
describe
'project repository'
do
describe
'project repository'
do
it_behaves_like
'parsing gl_repository identifier'
do
it_behaves_like
'parsing gl_repository identifier'
do
...
...
spec/lib/gitlab/gl_repository/repo_type_spec.rb
View file @
c202da25
...
@@ -3,8 +3,8 @@ require 'spec_helper'
...
@@ -3,8 +3,8 @@ require 'spec_helper'
RSpec
.
describe
Gitlab
::
GlRepository
::
RepoType
do
RSpec
.
describe
Gitlab
::
GlRepository
::
RepoType
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
owner
)
}
let_it_be
(
:personal_snippet
)
{
create
(
:personal_snippet
,
author:
project
.
first_
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:project_snippet
)
{
create
(
:project_snippet
,
project:
project
,
author:
project
.
first_
owner
)
}
let
(
:project_path
)
{
project
.
repository
.
full_path
}
let
(
:project_path
)
{
project
.
repository
.
full_path
}
let
(
:wiki_path
)
{
project
.
wiki
.
repository
.
full_path
}
let
(
:wiki_path
)
{
project
.
wiki
.
repository
.
full_path
}
...
...
spec/lib/gitlab/graphql/markdown_field_spec.rb
View file @
c202da25
...
@@ -73,7 +73,7 @@ RSpec.describe Gitlab::Graphql::MarkdownField do
...
@@ -73,7 +73,7 @@ RSpec.describe Gitlab::Graphql::MarkdownField do
end
end
it
'shows the reference to users that are allowed to see it'
do
it
'shows the reference to users that are allowed to see it'
do
context
=
GraphQL
::
Query
::
Context
.
new
(
query:
query
,
values:
{
current_user:
project
.
owner
},
object:
nil
)
context
=
GraphQL
::
Query
::
Context
.
new
(
query:
query
,
values:
{
current_user:
project
.
first_
owner
},
object:
nil
)
type_instance
=
type_class
.
authorized_new
(
note
,
context
)
type_instance
=
type_class
.
authorized_new
(
note
,
context
)
expect
(
field
.
to_graphql
.
resolve
(
type_instance
,
{},
context
)).
to
include
(
issue_path
(
issue
))
expect
(
field
.
to_graphql
.
resolve
(
type_instance
,
{},
context
)).
to
include
(
issue_path
(
issue
))
...
...
spec/lib/gitlab/project_authorizations_spec.rb
View file @
c202da25
...
@@ -334,7 +334,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
...
@@ -334,7 +334,7 @@ RSpec.describe Gitlab::ProjectAuthorizations do
let
(
:common_id
)
{
non_existing_record_id
}
let
(
:common_id
)
{
non_existing_record_id
}
let!
(
:group
)
{
create
(
:group
,
id:
common_id
)
}
let!
(
:group
)
{
create
(
:group
,
id:
common_id
)
}
let!
(
:unrelated_project
)
{
create
(
:project
,
id:
common_id
)
}
let!
(
:unrelated_project
)
{
create
(
:project
,
id:
common_id
)
}
let
(
:user
)
{
unrelated_project
.
owner
}
let
(
:user
)
{
unrelated_project
.
first_
owner
}
it
'does not have access to group and its projects'
do
it
'does not have access to group and its projects'
do
mapping
=
map_access_levels
(
authorizations
)
mapping
=
map_access_levels
(
authorizations
)
...
...
spec/lib/sidebars/projects/menus/analytics_menu_spec.rb
View file @
c202da25
...
@@ -8,7 +8,7 @@ RSpec.describe Sidebars::Projects::Menus::AnalyticsMenu do
...
@@ -8,7 +8,7 @@ RSpec.describe Sidebars::Projects::Menus::AnalyticsMenu do
create
(
:user
).
tap
{
|
u
|
project
.
add_guest
(
u
)
}
create
(
:user
).
tap
{
|
u
|
project
.
add_guest
(
u
)
}
end
end
let
(
:owner
)
{
project
.
owner
}
let
(
:owner
)
{
project
.
first_
owner
}
let
(
:current_user
)
{
owner
}
let
(
:current_user
)
{
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
current_user
,
container:
project
,
current_ref:
project
.
repository
.
root_ref
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
current_user
,
container:
project
,
current_ref:
project
.
repository
.
root_ref
)
}
...
...
spec/lib/sidebars/projects/menus/ci_cd_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
CiCdMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
CiCdMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:can_view_pipeline_editor
)
{
true
}
let
(
:can_view_pipeline_editor
)
{
true
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
current_ref:
'master'
,
can_view_pipeline_editor:
can_view_pipeline_editor
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
current_ref:
'master'
,
can_view_pipeline_editor:
can_view_pipeline_editor
)
}
...
...
spec/lib/sidebars/projects/menus/confluence_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ConfluenceMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ConfluenceMenu
do
let_it_be_with_refind
(
:project
)
{
create
(
:project
,
has_external_wiki:
true
)
}
let_it_be_with_refind
(
:project
)
{
create
(
:project
,
has_external_wiki:
true
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/deployments_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
DeploymentsMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
DeploymentsMenu
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
describe
'#render?'
do
describe
'#render?'
do
...
...
spec/lib/sidebars/projects/menus/external_issue_tracker_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ExternalIssueTrackerMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ExternalIssueTrackerMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:jira_issues_integration_active
)
{
false
}
let
(
:jira_issues_integration_active
)
{
false
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
jira_issues_integration:
jira_issues_integration_active
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
jira_issues_integration:
jira_issues_integration_active
)
}
...
...
spec/lib/sidebars/projects/menus/external_wiki_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ExternalWikiMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ExternalWikiMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/hidden_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
HiddenMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
HiddenMenu
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
current_ref:
project
.
repository
.
root_ref
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
current_ref:
project
.
repository
.
root_ref
)
}
describe
'#render?'
do
describe
'#render?'
do
...
...
spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
InfrastructureMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
InfrastructureMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
show_cluster_hint:
false
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
show_cluster_hint:
false
)
}
describe
'#render?'
do
describe
'#render?'
do
...
...
spec/lib/sidebars/projects/menus/invite_team_members_menu_spec.rb
View file @
c202da25
...
@@ -11,7 +11,7 @@ RSpec.describe Sidebars::Projects::Menus::InviteTeamMembersMenu do
...
@@ -11,7 +11,7 @@ RSpec.describe Sidebars::Projects::Menus::InviteTeamMembersMenu do
subject
(
:invite_menu
)
{
described_class
.
new
(
context
)
}
subject
(
:invite_menu
)
{
described_class
.
new
(
context
)
}
context
'when the project is viewed by an owner of the group'
do
context
'when the project is viewed by an owner of the group'
do
let
(
:owner
)
{
project
.
owner
}
let
(
:owner
)
{
project
.
first_
owner
}
describe
'#render?'
do
describe
'#render?'
do
it
'renders the Invite team members link'
do
it
'renders the Invite team members link'
do
...
...
spec/lib/sidebars/projects/menus/issues_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
IssuesMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
IssuesMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
MergeRequestsMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
MergeRequestsMenu
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/monitor_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
MonitorMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
MonitorMenu
do
let_it_be_with_refind
(
:project
)
{
create
(
:project
)
}
let_it_be_with_refind
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:show_cluster_hint
)
{
true
}
let
(
:show_cluster_hint
)
{
true
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
show_cluster_hint:
show_cluster_hint
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
show_cluster_hint:
show_cluster_hint
)
}
...
...
spec/lib/sidebars/projects/menus/packages_registries_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
PackagesRegistriesMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
PackagesRegistriesMenu
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/project_information_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ProjectInformationMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ProjectInformationMenu
do
let_it_be_with_reload
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be_with_reload
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
describe
'#container_html_options'
do
describe
'#container_html_options'
do
...
...
spec/lib/sidebars/projects/menus/repository_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
RepositoryMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
RepositoryMenu
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
current_ref:
'master'
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
current_ref:
'master'
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/scope_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ScopeMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ScopeMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
describe
'#container_html_options'
do
describe
'#container_html_options'
do
...
...
spec/lib/sidebars/projects/menus/security_compliance_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
SecurityComplianceMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
SecurityComplianceMenu
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:show_promotions
)
{
true
}
let
(
:show_promotions
)
{
true
}
let
(
:show_discover_project_security
)
{
true
}
let
(
:show_discover_project_security
)
{
true
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
show_promotions:
show_promotions
,
show_discover_project_security:
show_discover_project_security
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
,
show_promotions:
show_promotions
,
show_discover_project_security:
show_discover_project_security
)
}
...
...
spec/lib/sidebars/projects/menus/settings_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
SettingsMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
SettingsMenu
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/shimo_menu_spec.rb
View file @
c202da25
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ShimoMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
ShimoMenu
do
let_it_be_with_reload
(
:project
)
{
create
(
:project
)
}
let_it_be_with_reload
(
:project
)
{
create
(
:project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
project
.
owner
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
project
.
first_
owner
,
container:
project
)
}
subject
(
:shimo_menu
)
{
described_class
.
new
(
context
)
}
subject
(
:shimo_menu
)
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/snippets_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
SnippetsMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
SnippetsMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
spec/lib/sidebars/projects/menus/wiki_menu_spec.rb
View file @
c202da25
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
WikiMenu
do
RSpec
.
describe
Sidebars
::
Projects
::
Menus
::
WikiMenu
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
described_class
.
new
(
context
)
}
subject
{
described_class
.
new
(
context
)
}
...
...
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