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
Show 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'
RSpec
.
describe
AutocompleteController
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
context
'GET users'
do
let!
(
:user2
)
{
create
(
:user
)
}
...
...
spec/controllers/projects/artifacts_controller_spec.rb
View file @
e6132ec8
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
ArtifactsController
do
include
RepoHelpers
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
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
end
it
'sets appropriate caching headers'
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
subject
expect
(
response
.
cache_control
[
:public
]).
to
eq
(
true
)
...
...
@@ -63,7 +63,7 @@ RSpec.describe Projects::AvatarsController do
let
(
:project
)
{
create
(
:project
,
:repository
,
avatar:
fixture_file_upload
(
"spec/fixtures/dk.png"
,
"image/png"
))
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
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'
RSpec
.
describe
Projects
::
HooksController
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/controllers/projects/merge_requests/conflicts_controller_spec.rb
View file @
e6132ec8
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
MergeRequests
::
ConflictsController
do
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_with_conflicts
)
do
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'
RSpec
.
describe
Projects
::
MergeRequests
::
CreationsController
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:fork_project
)
{
create
(
:forked_project_with_submodules
)
}
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
let
(
:project
)
{
create
(
:project
,
:repository
)
}
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
(
:params
)
do
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
e6132ec8
...
...
@@ -9,7 +9,7 @@ RSpec.describe Projects::MergeRequestsController do
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
(
: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_source_project
)
{
project
}
...
...
spec/controllers/projects/mirrors_controller_spec.rb
View file @
e6132ec8
...
...
@@ -7,7 +7,7 @@ RSpec.describe Projects::MirrorsController do
shared_examples
'only admin is allowed when mirroring is disabled'
do
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'
)
}
context
'when project mirroring is enabled'
do
...
...
@@ -88,7 +88,7 @@ RSpec.describe Projects::MirrorsController do
context
'when the current project is not a mirror'
do
it
'allows to create a remote mirror'
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
expect
do
do_put
(
project
,
remote_mirrors_attributes:
{
'0'
=>
{
'enabled'
=>
1
,
'url'
=>
'http://foo.com'
}
})
...
...
@@ -106,7 +106,7 @@ RSpec.describe Projects::MirrorsController do
end
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
})
expect
(
response
).
to
redirect_to
(
project_settings_repository_path
(
project
,
anchor:
'js-push-remote-settings'
))
...
...
@@ -126,7 +126,7 @@ RSpec.describe Projects::MirrorsController do
let
(
:project
)
{
create
(
:project
,
:repository
,
:remote_mirror
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
context
'With valid URL for a push'
do
...
...
@@ -169,7 +169,7 @@ RSpec.describe Projects::MirrorsController do
let
(
:cache
)
{
SshHostKey
.
new
(
project:
project
,
url:
"ssh://example.com:22"
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
context
'invalid URLs'
do
...
...
spec/controllers/projects/pipelines_controller_spec.rb
View file @
e6132ec8
...
...
@@ -1169,7 +1169,7 @@ RSpec.describe Projects::PipelinesController do
context
'when user has ability to delete pipeline'
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
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
shared_examples
'counter is increased'
do
|
counter
|
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
expect
do
...
...
@@ -55,7 +55,7 @@ RSpec.describe Projects::ServicePingController do
end
context
'when web ide clientside preview is not enabled'
do
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
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
context
'when repository container is a project'
do
it_behaves_like
Repositories
::
GitHttpController
do
let
(
:container
)
{
project
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:access_checker_class
)
{
Gitlab
::
GitAccess
}
it_behaves_like
'handles unavailable Gitaly'
...
...
@@ -103,7 +103,7 @@ RSpec.describe Repositories::GitHttpController do
context
'when repository container is a project wiki'
do
it_behaves_like
Repositories
::
GitHttpController
do
let
(
:container
)
{
create
(
:project_wiki
,
:empty_repo
,
project:
project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:access_checker_class
)
{
Gitlab
::
GitAccessWiki
}
end
end
...
...
spec/graphql/features/authorization_spec.rb
View file @
e6132ec8
...
...
@@ -326,7 +326,7 @@ RSpec.describe 'DeclarativePolicy authorization in GraphQL ' do
let!
(
:other_project
)
{
create
(
:project
,
:private
)
}
let!
(
:visible_issues
)
{
create_list
(
:issue
,
2
,
project:
visible_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
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
let_it_be
(
:alert
)
{
create
(
:alert_management_alert
)
}
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
}
}
...
...
spec/graphql/mutations/issues/create_spec.rb
View file @
e6132ec8
...
...
@@ -121,7 +121,7 @@ RSpec.describe Mutations::Issues::Create do
end
context
'when creating an issue as owner'
do
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
before
do
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
include
GraphqlHelpers
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
)
}
describe
'#resolve'
do
...
...
spec/graphql/resolvers/package_pipelines_resolver_spec.rb
View file @
e6132ec8
...
...
@@ -8,7 +8,7 @@ RSpec.describe Resolvers::PackagePipelinesResolver do
let_it_be_with_reload
(
:package
)
{
create
(
:package
)
}
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
)
{
{}
}
describe
'#resolve'
do
...
...
spec/graphql/types/global_id_type_spec.rb
View file @
e6132ec8
...
...
@@ -191,7 +191,7 @@ RSpec.describe Types::GlobalIDType do
describe
'executing against the schema'
do
let
(
:query_result
)
do
context
=
{
current_user:
issue
.
project
.
owner
}
context
=
{
current_user:
issue
.
project
.
first_
owner
}
variables
=
{
'id'
=>
gid
}
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