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
09d5bf5e
Commit
09d5bf5e
authored
Jan 24, 2022
by
charlie ablett
Committed by
Alex Kalderimis
Jan 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace owner with first_owner in request specs
parent
f62b6a67
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
41 additions
and
41 deletions
+41
-41
spec/presenters/blob_presenter_spec.rb
spec/presenters/blob_presenter_spec.rb
+1
-1
spec/requests/api/api_spec.rb
spec/requests/api/api_spec.rb
+1
-1
spec/requests/api/ci/pipelines_spec.rb
spec/requests/api/ci/pipelines_spec.rb
+1
-1
spec/requests/api/ci/runners_reset_registration_token_spec.rb
.../requests/api/ci/runners_reset_registration_token_spec.rb
+1
-1
spec/requests/api/graphql/ci/ci_cd_setting_spec.rb
spec/requests/api/graphql/ci/ci_cd_setting_spec.rb
+1
-1
spec/requests/api/graphql/container_repository/container_repository_details_spec.rb
...container_repository/container_repository_details_spec.rb
+1
-1
spec/requests/api/graphql/gitlab_schema_spec.rb
spec/requests/api/graphql/gitlab_schema_spec.rb
+2
-2
spec/requests/api/graphql/mutations/ci/ci_cd_settings_update_spec.rb
...ts/api/graphql/mutations/ci/ci_cd_settings_update_spec.rb
+1
-1
spec/requests/api/graphql/mutations/ci/job_token_scope/add_project_spec.rb
.../graphql/mutations/ci/job_token_scope/add_project_spec.rb
+1
-1
spec/requests/api/graphql/mutations/ci/job_token_scope/remove_project_spec.rb
...aphql/mutations/ci/job_token_scope/remove_project_spec.rb
+1
-1
spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
...equests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
+1
-1
spec/requests/api/graphql/mutations/ci/runners_registration_token/reset_spec.rb
...hql/mutations/ci/runners_registration_token/reset_spec.rb
+1
-1
spec/requests/api/graphql/mutations/security/ci_configuration/configure_sast_iac_spec.rb
...ions/security/ci_configuration/configure_sast_iac_spec.rb
+1
-1
spec/requests/api/graphql/mutations/security/ci_configuration/configure_secret_detection_spec.rb
...urity/ci_configuration/configure_secret_detection_spec.rb
+1
-1
spec/requests/api/graphql/project/container_expiration_policy_spec.rb
...s/api/graphql/project/container_expiration_policy_spec.rb
+1
-1
spec/requests/api/graphql/project/container_repositories_spec.rb
...quests/api/graphql/project/container_repositories_spec.rb
+1
-1
spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb
...ject/error_tracking/sentry_detailed_error_request_spec.rb
+1
-1
spec/requests/api/graphql/project/error_tracking/sentry_errors_request_spec.rb
...phql/project/error_tracking/sentry_errors_request_spec.rb
+1
-1
spec/requests/api/graphql/project/grafana_integration_spec.rb
.../requests/api/graphql/project/grafana_integration_spec.rb
+1
-1
spec/requests/api/graphql/project/issue/design_collection/versions_spec.rb
.../graphql/project/issue/design_collection/versions_spec.rb
+1
-1
spec/requests/api/graphql/project/issue/designs/designs_spec.rb
...equests/api/graphql/project/issue/designs/designs_spec.rb
+1
-1
spec/requests/api/graphql/project/issue/designs/notes_spec.rb
.../requests/api/graphql/project/issue/designs/notes_spec.rb
+1
-1
spec/requests/api/graphql/project/repository/blobs_spec.rb
spec/requests/api/graphql/project/repository/blobs_spec.rb
+1
-1
spec/requests/api/graphql/project/repository_spec.rb
spec/requests/api/graphql/project/repository_spec.rb
+1
-1
spec/requests/api/graphql/project/tree/tree_spec.rb
spec/requests/api/graphql/project/tree/tree_spec.rb
+1
-1
spec/requests/api/markdown_spec.rb
spec/requests/api/markdown_spec.rb
+2
-2
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+1
-1
spec/requests/api/project_export_spec.rb
spec/requests/api/project_export_spec.rb
+1
-1
spec/requests/api/project_snapshots_spec.rb
spec/requests/api/project_snapshots_spec.rb
+1
-1
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+2
-2
spec/requests/boards/lists_controller_spec.rb
spec/requests/boards/lists_controller_spec.rb
+1
-1
spec/requests/import/gitlab_projects_controller_spec.rb
spec/requests/import/gitlab_projects_controller_spec.rb
+1
-1
spec/requests/projects/clusters/integrations_controller_spec.rb
...equests/projects/clusters/integrations_controller_spec.rb
+1
-1
spec/requests/projects/merge_requests/creations_spec.rb
spec/requests/projects/merge_requests/creations_spec.rb
+1
-1
spec/requests/projects/merge_requests_discussions_spec.rb
spec/requests/projects/merge_requests_discussions_spec.rb
+1
-1
spec/requests/projects/merge_requests_spec.rb
spec/requests/projects/merge_requests_spec.rb
+1
-1
spec/requests/projects/metrics_dashboard_spec.rb
spec/requests/projects/metrics_dashboard_spec.rb
+1
-1
spec/requests/projects/noteable_notes_spec.rb
spec/requests/projects/noteable_notes_spec.rb
+1
-1
No files found.
spec/presenters/blob_presenter_spec.rb
View file @
09d5bf5e
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
BlobPresenter
do
RSpec
.
describe
BlobPresenter
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
(
:repository
)
{
project
.
repository
}
let
(
:repository
)
{
project
.
repository
}
let
(
:blob
)
{
repository
.
blob_at
(
'HEAD'
,
'files/ruby/regex.rb'
)
}
let
(
:blob
)
{
repository
.
blob_at
(
'HEAD'
,
'files/ruby/regex.rb'
)
}
...
...
spec/requests/api/api_spec.rb
View file @
09d5bf5e
...
@@ -102,7 +102,7 @@ RSpec.describe API::API do
...
@@ -102,7 +102,7 @@ RSpec.describe API::API do
describe
'logging'
,
:aggregate_failures
do
describe
'logging'
,
:aggregate_failures
do
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
context
'when the endpoint is handled by the application'
do
context
'when the endpoint is handled by the application'
do
context
'when the endpoint supports all possible fields'
do
context
'when the endpoint supports all possible fields'
do
...
...
spec/requests/api/ci/pipelines_spec.rb
View file @
09d5bf5e
...
@@ -988,7 +988,7 @@ RSpec.describe API::Ci::Pipelines do
...
@@ -988,7 +988,7 @@ RSpec.describe API::Ci::Pipelines do
describe
'DELETE /projects/:id/pipelines/:pipeline_id'
do
describe
'DELETE /projects/:id/pipelines/:pipeline_id'
do
context
'authorized user'
do
context
'authorized user'
do
let
(
:owner
)
{
project
.
owner
}
let
(
:owner
)
{
project
.
first_
owner
}
it
'destroys the pipeline'
do
it
'destroys the pipeline'
do
delete
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
"
,
owner
)
delete
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
"
,
owner
)
...
...
spec/requests/api/ci/runners_reset_registration_token_spec.rb
View file @
09d5bf5e
...
@@ -138,7 +138,7 @@ RSpec.describe API::Ci::Runners do
...
@@ -138,7 +138,7 @@ RSpec.describe API::Ci::Runners do
end
end
include_context
'when authorized'
,
'project'
do
include_context
'when authorized'
,
'project'
do
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
def
get_token
def
get_token
project
.
reload
.
runners_token
project
.
reload
.
runners_token
...
...
spec/requests/api/graphql/ci/ci_cd_setting_spec.rb
View file @
09d5bf5e
...
@@ -5,7 +5,7 @@ RSpec.describe 'Getting Ci Cd Setting' do
...
@@ -5,7 +5,7 @@ RSpec.describe 'Getting Ci Cd Setting' do
include
GraphqlHelpers
include
GraphqlHelpers
let_it_be_with_reload
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be_with_reload
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
let
(
:fields
)
do
let
(
:fields
)
do
<<~
QUERY
<<~
QUERY
...
...
spec/requests/api/graphql/container_repository/container_repository_details_spec.rb
View file @
09d5bf5e
...
@@ -17,7 +17,7 @@ RSpec.describe 'container repository details' do
...
@@ -17,7 +17,7 @@ RSpec.describe 'container repository details' do
)
)
end
end
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:variables
)
{
{}
}
let
(
:variables
)
{
{}
}
let
(
:tags
)
{
%w[latest tag1 tag2 tag3 tag4 tag5]
}
let
(
:tags
)
{
%w[latest tag1 tag2 tag3 tag4 tag5]
}
let
(
:container_repository_global_id
)
{
container_repository
.
to_global_id
.
to_s
}
let
(
:container_repository_global_id
)
{
container_repository
.
to_global_id
.
to_s
}
...
...
spec/requests/api/graphql/gitlab_schema_spec.rb
View file @
09d5bf5e
...
@@ -166,7 +166,7 @@ RSpec.describe 'GitlabSchema configurations' do
...
@@ -166,7 +166,7 @@ RSpec.describe 'GitlabSchema configurations' do
end
end
context
'authentication'
do
context
'authentication'
do
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
it
'authenticates all queries'
do
it
'authenticates all queries'
do
subject
subject
...
@@ -216,7 +216,7 @@ RSpec.describe 'GitlabSchema configurations' do
...
@@ -216,7 +216,7 @@ RSpec.describe 'GitlabSchema configurations' do
context
"global id's"
do
context
"global id's"
do
it
'uses GlobalID to expose ids'
do
it
'uses GlobalID to expose ids'
do
post_graphql
(
graphql_query_for
(
'project'
,
{
'fullPath'
=>
project
.
full_path
},
%w(id)
),
post_graphql
(
graphql_query_for
(
'project'
,
{
'fullPath'
=>
project
.
full_path
},
%w(id)
),
current_user:
project
.
owner
)
current_user:
project
.
first_
owner
)
parsed_id
=
GlobalID
.
parse
(
graphql_data
[
'project'
][
'id'
])
parsed_id
=
GlobalID
.
parse
(
graphql_data
[
'project'
][
'id'
])
...
...
spec/requests/api/graphql/mutations/ci/ci_cd_settings_update_spec.rb
View file @
09d5bf5e
...
@@ -45,7 +45,7 @@ RSpec.describe 'CiCdSettingsUpdate' do
...
@@ -45,7 +45,7 @@ RSpec.describe 'CiCdSettingsUpdate' do
end
end
context
'when authorized'
do
context
'when authorized'
do
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
it
'updates ci cd settings'
do
it
'updates ci cd settings'
do
post_graphql_mutation
(
mutation
,
current_user:
user
)
post_graphql_mutation
(
mutation
,
current_user:
user
)
...
...
spec/requests/api/graphql/mutations/ci/job_token_scope/add_project_spec.rb
View file @
09d5bf5e
...
@@ -49,7 +49,7 @@ RSpec.describe 'CiJobTokenScopeAddProject' do
...
@@ -49,7 +49,7 @@ RSpec.describe 'CiJobTokenScopeAddProject' do
end
end
context
'when authorized'
do
context
'when authorized'
do
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
before
do
before
do
target_project
.
add_developer
(
current_user
)
target_project
.
add_developer
(
current_user
)
...
...
spec/requests/api/graphql/mutations/ci/job_token_scope/remove_project_spec.rb
View file @
09d5bf5e
...
@@ -55,7 +55,7 @@ RSpec.describe 'CiJobTokenScopeRemoveProject' do
...
@@ -55,7 +55,7 @@ RSpec.describe 'CiJobTokenScopeRemoveProject' do
end
end
context
'when authorized'
do
context
'when authorized'
do
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
before
do
before
do
target_project
.
add_guest
(
current_user
)
target_project
.
add_guest
(
current_user
)
...
...
spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
View file @
09d5bf5e
...
@@ -6,7 +6,7 @@ RSpec.describe 'PipelineDestroy' do
...
@@ -6,7 +6,7 @@ RSpec.describe 'PipelineDestroy' do
include
GraphqlHelpers
include
GraphqlHelpers
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_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
:success
,
project:
project
,
user:
user
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
:success
,
project:
project
,
user:
user
)
}
let
(
:mutation
)
do
let
(
:mutation
)
do
...
...
spec/requests/api/graphql/mutations/ci/runners_registration_token/reset_spec.rb
View file @
09d5bf5e
...
@@ -71,7 +71,7 @@ RSpec.describe 'RunnersRegistrationTokenReset' do
...
@@ -71,7 +71,7 @@ RSpec.describe 'RunnersRegistrationTokenReset' do
end
end
include_context
'when authorized'
,
'project'
do
include_context
'when authorized'
,
'project'
do
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
def
get_token
def
get_token
project
.
reload
.
runners_token
project
.
reload
.
runners_token
...
...
spec/requests/api/graphql/mutations/security/ci_configuration/configure_sast_iac_spec.rb
View file @
09d5bf5e
...
@@ -12,7 +12,7 @@ RSpec.describe 'ConfigureSastIac' do
...
@@ -12,7 +12,7 @@ RSpec.describe 'ConfigureSastIac' do
let
(
:mutation_response
)
{
graphql_mutation_response
(
:configureSastIac
)
}
let
(
:mutation_response
)
{
graphql_mutation_response
(
:configureSastIac
)
}
context
'when authorized'
do
context
'when authorized'
do
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
it
'creates a branch with sast iac configured'
do
it
'creates a branch with sast iac configured'
do
post_graphql_mutation
(
mutation
,
current_user:
user
)
post_graphql_mutation
(
mutation
,
current_user:
user
)
...
...
spec/requests/api/graphql/mutations/security/ci_configuration/configure_secret_detection_spec.rb
View file @
09d5bf5e
...
@@ -12,7 +12,7 @@ RSpec.describe 'ConfigureSecretDetection' do
...
@@ -12,7 +12,7 @@ RSpec.describe 'ConfigureSecretDetection' do
let
(
:mutation_response
)
{
graphql_mutation_response
(
:configureSecretDetection
)
}
let
(
:mutation_response
)
{
graphql_mutation_response
(
:configureSecretDetection
)
}
context
'when authorized'
do
context
'when authorized'
do
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
it
'creates a branch with secret detection configured'
do
it
'creates a branch with secret detection configured'
do
post_graphql_mutation
(
mutation
,
current_user:
user
)
post_graphql_mutation
(
mutation
,
current_user:
user
)
...
...
spec/requests/api/graphql/project/container_expiration_policy_spec.rb
View file @
09d5bf5e
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting a repository in a project' do
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting a repository in a project' do
include
GraphqlHelpers
include
GraphqlHelpers
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
let_it_be
(
:container_expiration_policy
)
{
project
.
container_expiration_policy
}
let_it_be
(
:container_expiration_policy
)
{
project
.
container_expiration_policy
}
let
(
:fields
)
do
let
(
:fields
)
do
...
...
spec/requests/api/graphql/project/container_repositories_spec.rb
View file @
09d5bf5e
...
@@ -38,7 +38,7 @@ RSpec.describe 'getting container repositories in a project' do
...
@@ -38,7 +38,7 @@ RSpec.describe 'getting container repositories in a project' do
)
)
end
end
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:variables
)
{
{}
}
let
(
:variables
)
{
{}
}
let
(
:container_repositories_response
)
{
graphql_data
.
dig
(
'project'
,
'containerRepositories'
,
'edges'
)
}
let
(
:container_repositories_response
)
{
graphql_data
.
dig
(
'project'
,
'containerRepositories'
,
'edges'
)
}
let
(
:container_repositories_count_response
)
{
graphql_data
.
dig
(
'project'
,
'containerRepositoriesCount'
)
}
let
(
:container_repositories_count_response
)
{
graphql_data
.
dig
(
'project'
,
'containerRepositoriesCount'
)
}
...
...
spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb
View file @
09d5bf5e
...
@@ -6,7 +6,7 @@ RSpec.describe 'getting a detailed sentry error' do
...
@@ -6,7 +6,7 @@ RSpec.describe 'getting a detailed sentry error' do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project_setting
)
{
create
(
:project_error_tracking_setting
,
project:
project
)
}
let_it_be
(
:project_setting
)
{
create
(
:project_error_tracking_setting
,
project:
project
)
}
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
let_it_be
(
:sentry_detailed_error
)
{
build
(
:error_tracking_sentry_detailed_error
)
}
let_it_be
(
:sentry_detailed_error
)
{
build
(
:error_tracking_sentry_detailed_error
)
}
let
(
:sentry_gid
)
{
sentry_detailed_error
.
to_global_id
.
to_s
}
let
(
:sentry_gid
)
{
sentry_detailed_error
.
to_global_id
.
to_s
}
...
...
spec/requests/api/graphql/project/error_tracking/sentry_errors_request_spec.rb
View file @
09d5bf5e
...
@@ -6,7 +6,7 @@ RSpec.describe 'sentry errors requests' do
...
@@ -6,7 +6,7 @@ RSpec.describe 'sentry errors requests' do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project_setting
)
{
create
(
:project_error_tracking_setting
,
project:
project
)
}
let_it_be
(
:project_setting
)
{
create
(
:project_error_tracking_setting
,
project:
project
)
}
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
let
(
:query
)
do
let
(
:query
)
do
graphql_query_for
(
graphql_query_for
(
...
...
spec/requests/api/graphql/project/grafana_integration_spec.rb
View file @
09d5bf5e
...
@@ -5,7 +5,7 @@ RSpec.describe 'Getting Grafana Integration' do
...
@@ -5,7 +5,7 @@ RSpec.describe 'Getting Grafana Integration' do
include
GraphqlHelpers
include
GraphqlHelpers
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
let_it_be
(
:grafana_integration
)
{
create
(
:grafana_integration
,
project:
project
)
}
let_it_be
(
:grafana_integration
)
{
create
(
:grafana_integration
,
project:
project
)
}
let
(
:fields
)
do
let
(
:fields
)
do
...
...
spec/requests/api/graphql/project/issue/design_collection/versions_spec.rb
View file @
09d5bf5e
...
@@ -24,7 +24,7 @@ RSpec.describe 'Getting versions related to an issue' do
...
@@ -24,7 +24,7 @@ RSpec.describe 'Getting versions related to an issue' do
create
(
:design_version
,
issue:
issue
)
create
(
:design_version
,
issue:
issue
)
end
end
let_it_be
(
:owner
)
{
issue
.
project
.
owner
}
let_it_be
(
:owner
)
{
issue
.
project
.
first_
owner
}
def
version_query
(
params
=
version_params
)
def
version_query
(
params
=
version_params
)
query_graphql_field
(
:versions
,
params
,
version_query_fields
)
query_graphql_field
(
:versions
,
params
,
version_query_fields
)
...
...
spec/requests/api/graphql/project/issue/designs/designs_spec.rb
View file @
09d5bf5e
...
@@ -7,7 +7,7 @@ RSpec.describe 'Getting designs related to an issue' do
...
@@ -7,7 +7,7 @@ RSpec.describe 'Getting designs related to an issue' do
include
DesignManagementTestHelpers
include
DesignManagementTestHelpers
let_it_be
(
:design
)
{
create
(
:design
,
:with_smaller_image_versions
,
versions_count:
1
)
}
let_it_be
(
:design
)
{
create
(
:design
,
:with_smaller_image_versions
,
versions_count:
1
)
}
let_it_be
(
:current_user
)
{
design
.
project
.
owner
}
let_it_be
(
:current_user
)
{
design
.
project
.
first_
owner
}
let
(
:design_query
)
do
let
(
:design_query
)
do
<<~
NODE
<<~
NODE
...
...
spec/requests/api/graphql/project/issue/designs/notes_spec.rb
View file @
09d5bf5e
...
@@ -9,7 +9,7 @@ RSpec.describe 'Getting designs related to an issue' do
...
@@ -9,7 +9,7 @@ RSpec.describe 'Getting designs related to an issue' do
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:design
)
{
create
(
:design
,
:with_file
,
versions_count:
1
,
issue:
issue
)
}
let_it_be
(
:design
)
{
create
(
:design
,
:with_file
,
versions_count:
1
,
issue:
issue
)
}
let_it_be
(
:current_user
)
{
project
.
owner
}
let_it_be
(
:current_user
)
{
project
.
first_
owner
}
let_it_be
(
:note
)
{
create
(
:diff_note_on_design
,
noteable:
design
,
project:
project
)
}
let_it_be
(
:note
)
{
create
(
:diff_note_on_design
,
noteable:
design
,
project:
project
)
}
before
do
before
do
...
...
spec/requests/api/graphql/project/repository/blobs_spec.rb
View file @
09d5bf5e
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting blobs in a project repository' do
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting blobs in a project repository' do
include
GraphqlHelpers
include
GraphqlHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:paths
)
{
[
"CONTRIBUTING.md"
,
"README.md"
]
}
let
(
:paths
)
{
[
"CONTRIBUTING.md"
,
"README.md"
]
}
let
(
:ref
)
{
project
.
default_branch
}
let
(
:ref
)
{
project
.
default_branch
}
let
(
:fields
)
do
let
(
:fields
)
do
...
...
spec/requests/api/graphql/project/repository_spec.rb
View file @
09d5bf5e
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting a repository in a project' do
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting a repository in a project' do
include
GraphqlHelpers
include
GraphqlHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:fields
)
do
let
(
:fields
)
do
<<~
QUERY
<<~
QUERY
#{
all_graphql_fields_for
(
'repository'
.
classify
)
}
#{
all_graphql_fields_for
(
'repository'
.
classify
)
}
...
...
spec/requests/api/graphql/project/tree/tree_spec.rb
View file @
09d5bf5e
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting a tree in a project' do
...
@@ -5,7 +5,7 @@ RSpec.describe 'getting a tree in a project' do
include
GraphqlHelpers
include
GraphqlHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:path
)
{
""
}
let
(
:path
)
{
""
}
let
(
:ref
)
{
"master"
}
let
(
:ref
)
{
"master"
}
let
(
:fields
)
do
let
(
:fields
)
do
...
...
spec/requests/api/markdown_spec.rb
View file @
09d5bf5e
...
@@ -71,7 +71,7 @@ RSpec.describe API::Markdown do
...
@@ -71,7 +71,7 @@ RSpec.describe API::Markdown do
end
end
context
"when authorized"
do
context
"when authorized"
do
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
it_behaves_like
"rendered markdown text without GFM"
it_behaves_like
"rendered markdown text without GFM"
end
end
...
@@ -97,7 +97,7 @@ RSpec.describe API::Markdown do
...
@@ -97,7 +97,7 @@ RSpec.describe API::Markdown do
context
"with project"
do
context
"with project"
do
let
(
:params
)
{
{
text:
text
,
gfm:
true
,
project:
project
.
full_path
}
}
let
(
:params
)
{
{
text:
text
,
gfm:
true
,
project:
project
.
full_path
}
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
it
"renders markdown text"
do
it
"renders markdown text"
do
expect
(
response
).
to
have_gitlab_http_status
(
:created
)
expect
(
response
).
to
have_gitlab_http_status
(
:created
)
...
...
spec/requests/api/merge_requests_spec.rb
View file @
09d5bf5e
...
@@ -2896,7 +2896,7 @@ RSpec.describe API::MergeRequests do
...
@@ -2896,7 +2896,7 @@ RSpec.describe API::MergeRequests do
it
'is false for an unauthorized user'
do
it
'is false for an unauthorized user'
do
expect
do
expect
do
put
api
(
"/projects/
#{
target_project
.
id
}
/merge_requests/
#{
merge_request
.
iid
}
"
,
target_project
.
owner
),
params:
{
state_event:
'close'
,
remove_source_branch:
true
}
put
api
(
"/projects/
#{
target_project
.
id
}
/merge_requests/
#{
merge_request
.
iid
}
"
,
target_project
.
first_
owner
),
params:
{
state_event:
'close'
,
remove_source_branch:
true
}
end
.
not_to
change
{
merge_request
.
reload
.
merge_params
}
end
.
not_to
change
{
merge_request
.
reload
.
merge_params
}
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
...
...
spec/requests/api/project_export_spec.rb
View file @
09d5bf5e
...
@@ -450,7 +450,7 @@ RSpec.describe API::ProjectExport, :clean_gitlab_redis_cache do
...
@@ -450,7 +450,7 @@ RSpec.describe API::ProjectExport, :clean_gitlab_redis_cache do
expect_next_instance_of
(
Projects
::
ImportExport
::
ExportService
)
do
|
service
|
expect_next_instance_of
(
Projects
::
ImportExport
::
ExportService
)
do
|
service
|
expect
(
service
).
to
receive
(
:execute
)
expect
(
service
).
to
receive
(
:execute
)
end
end
post
api
(
path
,
project
.
owner
),
params:
params
post
api
(
path
,
project
.
first_
owner
),
params:
params
expect
(
response
).
to
have_gitlab_http_status
(
:accepted
)
expect
(
response
).
to
have_gitlab_http_status
(
:accepted
)
end
end
...
...
spec/requests/api/project_snapshots_spec.rb
View file @
09d5bf5e
...
@@ -33,7 +33,7 @@ RSpec.describe API::ProjectSnapshots do
...
@@ -33,7 +33,7 @@ RSpec.describe API::ProjectSnapshots do
end
end
it
'returns authentication error as project owner'
do
it
'returns authentication error as project owner'
do
get
api
(
"/projects/
#{
project
.
id
}
/snapshot"
,
project
.
owner
)
get
api
(
"/projects/
#{
project
.
id
}
/snapshot"
,
project
.
first_
owner
)
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
end
end
...
...
spec/requests/api/projects_spec.rb
View file @
09d5bf5e
...
@@ -30,7 +30,7 @@ RSpec.shared_examples 'languages and percentages JSON response' do
...
@@ -30,7 +30,7 @@ RSpec.shared_examples 'languages and percentages JSON response' do
context
'when the languages were detected before'
do
context
'when the languages were detected before'
do
before
do
before
do
Projects
::
DetectRepositoryLanguagesService
.
new
(
project
,
project
.
owner
).
execute
Projects
::
DetectRepositoryLanguagesService
.
new
(
project
,
project
.
first_
owner
).
execute
end
end
it
'returns the detection from the database'
do
it
'returns the detection from the database'
do
...
@@ -2710,7 +2710,7 @@ RSpec.describe API::Projects do
...
@@ -2710,7 +2710,7 @@ RSpec.describe API::Projects do
it
'returns the project users'
do
it
'returns the project users'
do
get
api
(
"/projects/
#{
project
.
id
}
/users"
,
current_user
)
get
api
(
"/projects/
#{
project
.
id
}
/users"
,
current_user
)
user
=
project
.
namespace
.
owner
user
=
project
.
namespace
.
first_
owner
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
).
to
include_pagination_headers
expect
(
response
).
to
include_pagination_headers
...
...
spec/requests/boards/lists_controller_spec.rb
View file @
09d5bf5e
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Boards
::
ListsController
do
RSpec
.
describe
Boards
::
ListsController
do
describe
'#index'
do
describe
'#index'
do
let
(
:board
)
{
create
(
:board
)
}
let
(
:board
)
{
create
(
:board
)
}
let
(
:user
)
{
board
.
project
.
owner
}
let
(
:user
)
{
board
.
project
.
first_
owner
}
it
'does not have N+1 queries'
do
it
'does not have N+1 queries'
do
login_as
(
user
)
login_as
(
user
)
...
...
spec/requests/import/gitlab_projects_controller_spec.rb
View file @
09d5bf5e
...
@@ -8,7 +8,7 @@ RSpec.describe Import::GitlabProjectsController do
...
@@ -8,7 +8,7 @@ RSpec.describe Import::GitlabProjectsController do
include_context
'workhorse headers'
include_context
'workhorse headers'
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:user
)
{
namespace
.
owner
}
let_it_be
(
:user
)
{
namespace
.
first_
owner
}
before
do
before
do
login_as
(
user
)
login_as
(
user
)
...
...
spec/requests/projects/clusters/integrations_controller_spec.rb
View file @
09d5bf5e
...
@@ -28,7 +28,7 @@ RSpec.describe Projects::Clusters::IntegrationsController do
...
@@ -28,7 +28,7 @@ RSpec.describe Projects::Clusters::IntegrationsController do
describe
'POST create_or_update'
do
describe
'POST create_or_update'
do
let
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let
(
:project
)
{
cluster
.
project
}
let
(
:project
)
{
cluster
.
project
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
it_behaves_like
'#create_or_update action'
do
it_behaves_like
'#create_or_update action'
do
let
(
:path
)
{
create_or_update_project_cluster_integration_path
(
project
,
cluster
)
}
let
(
:path
)
{
create_or_update_project_cluster_integration_path
(
project
,
cluster
)
}
...
...
spec/requests/projects/merge_requests/creations_spec.rb
View file @
09d5bf5e
...
@@ -7,7 +7,7 @@ RSpec.describe 'merge requests creations' do
...
@@ -7,7 +7,7 @@ RSpec.describe 'merge requests creations' do
include
ProjectForksHelper
include
ProjectForksHelper
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
before
do
login_as
(
user
)
login_as
(
user
)
...
...
spec/requests/projects/merge_requests_discussions_spec.rb
View file @
09d5bf5e
...
@@ -6,7 +6,7 @@ RSpec.describe 'merge requests discussions' do
...
@@ -6,7 +6,7 @@ RSpec.describe 'merge requests discussions' do
# Further tests can be found at merge_requests_controller_spec.rb
# Further tests can be found at merge_requests_controller_spec.rb
describe
'GET /:namespace/:project/-/merge_requests/:iid/discussions'
do
describe
'GET /:namespace/:project/-/merge_requests/:iid/discussions'
do
let
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
let
(
:owner
)
{
project
.
owner
}
let
(
:owner
)
{
project
.
first_
owner
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
target_project:
project
,
source_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
target_project:
project
,
source_project:
project
)
}
...
...
spec/requests/projects/merge_requests_spec.rb
View file @
09d5bf5e
...
@@ -12,7 +12,7 @@ RSpec.describe 'merge requests actions' do
...
@@ -12,7 +12,7 @@ RSpec.describe 'merge requests actions' do
reviewers:
[
user2
])
reviewers:
[
user2
])
end
end
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
before
do
before
do
...
...
spec/requests/projects/metrics_dashboard_spec.rb
View file @
09d5bf5e
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects::MetricsDashboardController' do
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects::MetricsDashboardController' do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment2
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment2
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
before
do
before
do
project
.
add_developer
(
user
)
project
.
add_developer
(
user
)
...
...
spec/requests/projects/noteable_notes_spec.rb
View file @
09d5bf5e
...
@@ -9,7 +9,7 @@ RSpec.describe 'Project noteable notes' do
...
@@ -9,7 +9,7 @@ RSpec.describe 'Project noteable notes' do
let
(
:etag_store
)
{
Gitlab
::
EtagCaching
::
Store
.
new
}
let
(
:etag_store
)
{
Gitlab
::
EtagCaching
::
Store
.
new
}
let
(
:notes_path
)
{
project_noteable_notes_path
(
project
,
target_type:
merge_request
.
class
.
name
.
underscore
,
target_id:
merge_request
.
id
)
}
let
(
:notes_path
)
{
project_noteable_notes_path
(
project
,
target_type:
merge_request
.
class
.
name
.
underscore
,
target_id:
merge_request
.
id
)
}
let
(
:project
)
{
merge_request
.
project
}
let
(
:project
)
{
merge_request
.
project
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:response_etag
)
{
response
.
headers
[
'ETag'
]
}
let
(
:response_etag
)
{
response
.
headers
[
'ETag'
]
}
let
(
:stored_etag
)
{
"W/
\"
#{
etag_store
.
get
(
notes_path
)
}
\"
"
}
let
(
:stored_etag
)
{
"W/
\"
#{
etag_store
.
get
(
notes_path
)
}
\"
"
}
...
...
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