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
e6132ec8
Commit
e6132ec8
authored
Jan 20, 2022
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace owner with first_owner in specs
In spec/graphql and spec/controllers
parent
68755b38
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
25 additions
and
25 deletions
+25
-25
spec/controllers/autocomplete_controller_spec.rb
spec/controllers/autocomplete_controller_spec.rb
+1
-1
spec/controllers/projects/artifacts_controller_spec.rb
spec/controllers/projects/artifacts_controller_spec.rb
+1
-1
spec/controllers/projects/avatars_controller_spec.rb
spec/controllers/projects/avatars_controller_spec.rb
+2
-2
spec/controllers/projects/hooks_controller_spec.rb
spec/controllers/projects/hooks_controller_spec.rb
+1
-1
spec/controllers/projects/merge_requests/conflicts_controller_spec.rb
...lers/projects/merge_requests/conflicts_controller_spec.rb
+1
-1
spec/controllers/projects/merge_requests/creations_controller_spec.rb
...lers/projects/merge_requests/creations_controller_spec.rb
+1
-1
spec/controllers/projects/merge_requests/drafts_controller_spec.rb
...rollers/projects/merge_requests/drafts_controller_spec.rb
+1
-1
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+1
-1
spec/controllers/projects/mirrors_controller_spec.rb
spec/controllers/projects/mirrors_controller_spec.rb
+5
-5
spec/controllers/projects/pipelines_controller_spec.rb
spec/controllers/projects/pipelines_controller_spec.rb
+1
-1
spec/controllers/projects/service_ping_controller_spec.rb
spec/controllers/projects/service_ping_controller_spec.rb
+2
-2
spec/controllers/repositories/git_http_controller_spec.rb
spec/controllers/repositories/git_http_controller_spec.rb
+2
-2
spec/graphql/features/authorization_spec.rb
spec/graphql/features/authorization_spec.rb
+1
-1
spec/graphql/mutations/alert_management/alerts/todo/create_spec.rb
...hql/mutations/alert_management/alerts/todo/create_spec.rb
+1
-1
spec/graphql/mutations/issues/create_spec.rb
spec/graphql/mutations/issues/create_spec.rb
+1
-1
spec/graphql/resolvers/package_details_resolver_spec.rb
spec/graphql/resolvers/package_details_resolver_spec.rb
+1
-1
spec/graphql/resolvers/package_pipelines_resolver_spec.rb
spec/graphql/resolvers/package_pipelines_resolver_spec.rb
+1
-1
spec/graphql/types/global_id_type_spec.rb
spec/graphql/types/global_id_type_spec.rb
+1
-1
No files found.
spec/controllers/autocomplete_controller_spec.rb
View file @
e6132ec8
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
AutocompleteController
do
RSpec
.
describe
AutocompleteController
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
context
'GET users'
do
context
'GET users'
do
let!
(
:user2
)
{
create
(
:user
)
}
let!
(
:user2
)
{
create
(
:user
)
}
...
...
spec/controllers/projects/artifacts_controller_spec.rb
View file @
e6132ec8
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
ArtifactsController
do
RSpec
.
describe
Projects
::
ArtifactsController
do
include
RepoHelpers
include
RepoHelpers
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
let_it_be
(
:pipeline
,
reload:
true
)
do
let_it_be
(
:pipeline
,
reload:
true
)
do
...
...
spec/controllers/projects/avatars_controller_spec.rb
View file @
e6132ec8
...
@@ -38,7 +38,7 @@ RSpec.describe Projects::AvatarsController do
...
@@ -38,7 +38,7 @@ RSpec.describe Projects::AvatarsController do
end
end
it
'sets appropriate caching headers'
do
it
'sets appropriate caching headers'
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
subject
subject
expect
(
response
.
cache_control
[
:public
]).
to
eq
(
true
)
expect
(
response
.
cache_control
[
:public
]).
to
eq
(
true
)
...
@@ -63,7 +63,7 @@ RSpec.describe Projects::AvatarsController do
...
@@ -63,7 +63,7 @@ RSpec.describe Projects::AvatarsController do
let
(
:project
)
{
create
(
:project
,
:repository
,
avatar:
fixture_file_upload
(
"spec/fixtures/dk.png"
,
"image/png"
))
}
let
(
:project
)
{
create
(
:project
,
:repository
,
avatar:
fixture_file_upload
(
"spec/fixtures/dk.png"
,
"image/png"
))
}
before
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
end
it
'removes avatar from DB by calling destroy'
do
it
'removes avatar from DB by calling destroy'
do
...
...
spec/controllers/projects/hooks_controller_spec.rb
View file @
e6132ec8
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
HooksController
do
RSpec
.
describe
Projects
::
HooksController
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
sign_in
(
user
)
sign_in
(
user
)
...
...
spec/controllers/projects/merge_requests/conflicts_controller_spec.rb
View file @
e6132ec8
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
MergeRequests
::
ConflictsController
do
RSpec
.
describe
Projects
::
MergeRequests
::
ConflictsController
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
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
)
}
let
(
:merge_request_with_conflicts
)
do
let
(
:merge_request_with_conflicts
)
do
create
(
:merge_request
,
source_branch:
'conflict-resolvable'
,
target_branch:
'conflict-start'
,
source_project:
project
,
merge_status: :unchecked
)
do
|
mr
|
create
(
:merge_request
,
source_branch:
'conflict-resolvable'
,
target_branch:
'conflict-start'
,
source_project:
project
,
merge_status: :unchecked
)
do
|
mr
|
...
...
spec/controllers/projects/merge_requests/creations_controller_spec.rb
View file @
e6132ec8
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
MergeRequests
::
CreationsController
do
RSpec
.
describe
Projects
::
MergeRequests
::
CreationsController
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:fork_project
)
{
create
(
:forked_project_with_submodules
)
}
let
(
:fork_project
)
{
create
(
:forked_project_with_submodules
)
}
let
(
:get_diff_params
)
do
let
(
:get_diff_params
)
do
{
{
...
...
spec/controllers/projects/merge_requests/drafts_controller_spec.rb
View file @
e6132ec8
...
@@ -6,7 +6,7 @@ RSpec.describe Projects::MergeRequests::DraftsController do
...
@@ -6,7 +6,7 @@ RSpec.describe Projects::MergeRequests::DraftsController do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
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
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:params
)
do
let
(
:params
)
do
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
e6132ec8
...
@@ -9,7 +9,7 @@ RSpec.describe Projects::MergeRequestsController do
...
@@ -9,7 +9,7 @@ RSpec.describe Projects::MergeRequestsController do
let_it_be_with_refind
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be_with_refind
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be_with_reload
(
:project_public_with_private_builds
)
{
create
(
:project
,
:repository
,
:public
,
:builds_private
)
}
let_it_be_with_reload
(
:project_public_with_private_builds
)
{
create
(
:project
,
:repository
,
:public
,
:builds_private
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
target_project:
project
,
source_project:
merge_request_source_project
,
allow_collaboration:
false
)
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
target_project:
project
,
source_project:
merge_request_source_project
,
allow_collaboration:
false
)
}
let
(
:merge_request_source_project
)
{
project
}
let
(
:merge_request_source_project
)
{
project
}
...
...
spec/controllers/projects/mirrors_controller_spec.rb
View file @
e6132ec8
...
@@ -7,7 +7,7 @@ RSpec.describe Projects::MirrorsController do
...
@@ -7,7 +7,7 @@ RSpec.describe Projects::MirrorsController do
shared_examples
'only admin is allowed when mirroring is disabled'
do
shared_examples
'only admin is allowed when mirroring is disabled'
do
let
(
:subject_action
)
{
raise
'subject_action is required'
}
let
(
:subject_action
)
{
raise
'subject_action is required'
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:project_settings_path
)
{
project_settings_repository_path
(
project
,
anchor:
'js-push-remote-settings'
)
}
let
(
:project_settings_path
)
{
project_settings_repository_path
(
project
,
anchor:
'js-push-remote-settings'
)
}
context
'when project mirroring is enabled'
do
context
'when project mirroring is enabled'
do
...
@@ -88,7 +88,7 @@ RSpec.describe Projects::MirrorsController do
...
@@ -88,7 +88,7 @@ RSpec.describe Projects::MirrorsController do
context
'when the current project is not a mirror'
do
context
'when the current project is not a mirror'
do
it
'allows to create a remote mirror'
do
it
'allows to create a remote mirror'
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
expect
do
expect
do
do_put
(
project
,
remote_mirrors_attributes:
{
'0'
=>
{
'enabled'
=>
1
,
'url'
=>
'http://foo.com'
}
})
do_put
(
project
,
remote_mirrors_attributes:
{
'0'
=>
{
'enabled'
=>
1
,
'url'
=>
'http://foo.com'
}
})
...
@@ -106,7 +106,7 @@ RSpec.describe Projects::MirrorsController do
...
@@ -106,7 +106,7 @@ RSpec.describe Projects::MirrorsController do
end
end
it
'processes a successful update'
do
it
'processes a successful update'
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
do_put
(
project
,
remote_mirrors_attributes:
{
'0'
=>
ssh_mirror_attributes
})
do_put
(
project
,
remote_mirrors_attributes:
{
'0'
=>
ssh_mirror_attributes
})
expect
(
response
).
to
redirect_to
(
project_settings_repository_path
(
project
,
anchor:
'js-push-remote-settings'
))
expect
(
response
).
to
redirect_to
(
project_settings_repository_path
(
project
,
anchor:
'js-push-remote-settings'
))
...
@@ -126,7 +126,7 @@ RSpec.describe Projects::MirrorsController do
...
@@ -126,7 +126,7 @@ RSpec.describe Projects::MirrorsController do
let
(
:project
)
{
create
(
:project
,
:repository
,
:remote_mirror
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
:remote_mirror
)
}
before
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
end
context
'With valid URL for a push'
do
context
'With valid URL for a push'
do
...
@@ -169,7 +169,7 @@ RSpec.describe Projects::MirrorsController do
...
@@ -169,7 +169,7 @@ RSpec.describe Projects::MirrorsController do
let
(
:cache
)
{
SshHostKey
.
new
(
project:
project
,
url:
"ssh://example.com:22"
)
}
let
(
:cache
)
{
SshHostKey
.
new
(
project:
project
,
url:
"ssh://example.com:22"
)
}
before
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
end
context
'invalid URLs'
do
context
'invalid URLs'
do
...
...
spec/controllers/projects/pipelines_controller_spec.rb
View file @
e6132ec8
...
@@ -1169,7 +1169,7 @@ RSpec.describe Projects::PipelinesController do
...
@@ -1169,7 +1169,7 @@ RSpec.describe Projects::PipelinesController do
context
'when user has ability to delete pipeline'
do
context
'when user has ability to delete pipeline'
do
before
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
end
it
'deletes pipeline and redirects'
do
it
'deletes pipeline and redirects'
do
...
...
spec/controllers/projects/service_ping_controller_spec.rb
View file @
e6132ec8
...
@@ -32,7 +32,7 @@ RSpec.describe Projects::ServicePingController do
...
@@ -32,7 +32,7 @@ RSpec.describe Projects::ServicePingController do
shared_examples
'counter is increased'
do
|
counter
|
shared_examples
'counter is increased'
do
|
counter
|
context
'when the authenticated user has access to the project'
do
context
'when the authenticated user has access to the project'
do
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
it
'increments the usage counter'
do
it
'increments the usage counter'
do
expect
do
expect
do
...
@@ -55,7 +55,7 @@ RSpec.describe Projects::ServicePingController do
...
@@ -55,7 +55,7 @@ RSpec.describe Projects::ServicePingController do
end
end
context
'when web ide clientside preview is not enabled'
do
context
'when web ide clientside preview is not enabled'
do
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
before
do
stub_application_setting
(
web_ide_clientside_preview_enabled:
false
)
stub_application_setting
(
web_ide_clientside_preview_enabled:
false
)
...
...
spec/controllers/repositories/git_http_controller_spec.rb
View file @
e6132ec8
...
@@ -29,7 +29,7 @@ RSpec.describe Repositories::GitHttpController do
...
@@ -29,7 +29,7 @@ RSpec.describe Repositories::GitHttpController do
context
'when repository container is a project'
do
context
'when repository container is a project'
do
it_behaves_like
Repositories
::
GitHttpController
do
it_behaves_like
Repositories
::
GitHttpController
do
let
(
:container
)
{
project
}
let
(
:container
)
{
project
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:access_checker_class
)
{
Gitlab
::
GitAccess
}
let
(
:access_checker_class
)
{
Gitlab
::
GitAccess
}
it_behaves_like
'handles unavailable Gitaly'
it_behaves_like
'handles unavailable Gitaly'
...
@@ -103,7 +103,7 @@ RSpec.describe Repositories::GitHttpController do
...
@@ -103,7 +103,7 @@ RSpec.describe Repositories::GitHttpController do
context
'when repository container is a project wiki'
do
context
'when repository container is a project wiki'
do
it_behaves_like
Repositories
::
GitHttpController
do
it_behaves_like
Repositories
::
GitHttpController
do
let
(
:container
)
{
create
(
:project_wiki
,
:empty_repo
,
project:
project
)
}
let
(
:container
)
{
create
(
:project_wiki
,
:empty_repo
,
project:
project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:access_checker_class
)
{
Gitlab
::
GitAccessWiki
}
let
(
:access_checker_class
)
{
Gitlab
::
GitAccessWiki
}
end
end
end
end
...
...
spec/graphql/features/authorization_spec.rb
View file @
e6132ec8
...
@@ -326,7 +326,7 @@ RSpec.describe 'DeclarativePolicy authorization in GraphQL ' do
...
@@ -326,7 +326,7 @@ RSpec.describe 'DeclarativePolicy authorization in GraphQL ' do
let!
(
:other_project
)
{
create
(
:project
,
:private
)
}
let!
(
:other_project
)
{
create
(
:project
,
:private
)
}
let!
(
:visible_issues
)
{
create_list
(
:issue
,
2
,
project:
visible_project
)
}
let!
(
:visible_issues
)
{
create_list
(
:issue
,
2
,
project:
visible_project
)
}
let!
(
:other_issues
)
{
create_list
(
:issue
,
2
,
project:
other_project
)
}
let!
(
:other_issues
)
{
create_list
(
:issue
,
2
,
project:
other_project
)
}
let!
(
:user
)
{
visible_project
.
owner
}
let!
(
:user
)
{
visible_project
.
first_
owner
}
let
(
:issue_type
)
do
let
(
:issue_type
)
do
type_factory
do
|
type
|
type_factory
do
|
type
|
...
...
spec/graphql/mutations/alert_management/alerts/todo/create_spec.rb
View file @
e6132ec8
...
@@ -8,7 +8,7 @@ RSpec.describe Mutations::AlertManagement::Alerts::Todo::Create do
...
@@ -8,7 +8,7 @@ RSpec.describe Mutations::AlertManagement::Alerts::Todo::Create do
let_it_be
(
:alert
)
{
create
(
:alert_management_alert
)
}
let_it_be
(
:alert
)
{
create
(
:alert_management_alert
)
}
let_it_be
(
:project
)
{
alert
.
project
}
let_it_be
(
:project
)
{
alert
.
project
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:args
)
{
{
project_path:
project
.
full_path
,
iid:
alert
.
iid
}
}
let
(
:args
)
{
{
project_path:
project
.
full_path
,
iid:
alert
.
iid
}
}
...
...
spec/graphql/mutations/issues/create_spec.rb
View file @
e6132ec8
...
@@ -121,7 +121,7 @@ RSpec.describe Mutations::Issues::Create do
...
@@ -121,7 +121,7 @@ RSpec.describe Mutations::Issues::Create do
end
end
context
'when creating an issue as owner'
do
context
'when creating an issue as owner'
do
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
before
do
before
do
mutation_params
.
merge!
(
special_params
)
mutation_params
.
merge!
(
special_params
)
...
...
spec/graphql/resolvers/package_details_resolver_spec.rb
View file @
e6132ec8
...
@@ -6,7 +6,7 @@ RSpec.describe Resolvers::PackageDetailsResolver do
...
@@ -6,7 +6,7 @@ RSpec.describe Resolvers::PackageDetailsResolver do
include
GraphqlHelpers
include
GraphqlHelpers
let_it_be_with_reload
(
:project
)
{
create
(
:project
)
}
let_it_be_with_reload
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:package
)
{
create
(
:composer_package
,
project:
project
)
}
let_it_be
(
:package
)
{
create
(
:composer_package
,
project:
project
)
}
describe
'#resolve'
do
describe
'#resolve'
do
...
...
spec/graphql/resolvers/package_pipelines_resolver_spec.rb
View file @
e6132ec8
...
@@ -8,7 +8,7 @@ RSpec.describe Resolvers::PackagePipelinesResolver do
...
@@ -8,7 +8,7 @@ RSpec.describe Resolvers::PackagePipelinesResolver do
let_it_be_with_reload
(
:package
)
{
create
(
:package
)
}
let_it_be_with_reload
(
:package
)
{
create
(
:package
)
}
let_it_be
(
:pipelines
)
{
create_list
(
:ci_pipeline
,
3
,
project:
package
.
project
)
}
let_it_be
(
:pipelines
)
{
create_list
(
:ci_pipeline
,
3
,
project:
package
.
project
)
}
let
(
:user
)
{
package
.
project
.
owner
}
let
(
:user
)
{
package
.
project
.
first_
owner
}
let
(
:args
)
{
{}
}
let
(
:args
)
{
{}
}
describe
'#resolve'
do
describe
'#resolve'
do
...
...
spec/graphql/types/global_id_type_spec.rb
View file @
e6132ec8
...
@@ -191,7 +191,7 @@ RSpec.describe Types::GlobalIDType do
...
@@ -191,7 +191,7 @@ RSpec.describe Types::GlobalIDType do
describe
'executing against the schema'
do
describe
'executing against the schema'
do
let
(
:query_result
)
do
let
(
:query_result
)
do
context
=
{
current_user:
issue
.
project
.
owner
}
context
=
{
current_user:
issue
.
project
.
first_
owner
}
variables
=
{
'id'
=>
gid
}
variables
=
{
'id'
=>
gid
}
run_with_clean_state
(
query
,
context:
context
,
variables:
variables
).
to_h
run_with_clean_state
(
query
,
context:
context
,
variables:
variables
).
to_h
...
...
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