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
04fb787e
Commit
04fb787e
authored
Jan 21, 2022
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace owner with first_owner in finder specs
parent
2f33a8cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
spec/finders/autocomplete/users_finder_spec.rb
spec/finders/autocomplete/users_finder_spec.rb
+6
-3
spec/finders/ci/daily_build_group_report_results_finder_spec.rb
...inders/ci/daily_build_group_report_results_finder_spec.rb
+1
-1
spec/finders/merge_request_target_project_finder_spec.rb
spec/finders/merge_request_target_project_finder_spec.rb
+2
-2
No files found.
spec/finders/autocomplete/users_finder_spec.rb
View file @
04fb787e
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Autocomplete
::
UsersFinder
do
RSpec
.
describe
Autocomplete
::
UsersFinder
do
# TODO update when multiple owners are possible in projects
# https://gitlab.com/gitlab-org/gitlab/-/issues/21432
describe
'#execute'
do
describe
'#execute'
do
let!
(
:user1
)
{
create
(
:user
,
username:
'johndoe'
)
}
let!
(
:user1
)
{
create
(
:user
,
username:
'johndoe'
)
}
let!
(
:user2
)
{
create
(
:user
,
:blocked
,
username:
'notsorandom'
)
}
let!
(
:user2
)
{
create
(
:user
,
:blocked
,
username:
'notsorandom'
)
}
...
@@ -25,19 +28,19 @@ RSpec.describe Autocomplete::UsersFinder do
...
@@ -25,19 +28,19 @@ RSpec.describe Autocomplete::UsersFinder do
context
'when project passed'
do
context
'when project passed'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
it
{
is_expected
.
to
match_array
([
project
.
owner
])
}
it
{
is_expected
.
to
match_array
([
project
.
first_
owner
])
}
context
'when author_id passed'
do
context
'when author_id passed'
do
context
'and author is active'
do
context
'and author is active'
do
let
(
:params
)
{
{
author_id:
user1
.
id
}
}
let
(
:params
)
{
{
author_id:
user1
.
id
}
}
it
{
is_expected
.
to
match_array
([
project
.
owner
,
user1
])
}
it
{
is_expected
.
to
match_array
([
project
.
first_
owner
,
user1
])
}
end
end
context
'and author is blocked'
do
context
'and author is blocked'
do
let
(
:params
)
{
{
author_id:
user2
.
id
}
}
let
(
:params
)
{
{
author_id:
user2
.
id
}
}
it
{
is_expected
.
to
match_array
([
project
.
owner
])
}
it
{
is_expected
.
to
match_array
([
project
.
first_
owner
])
}
end
end
end
end
end
end
...
...
spec/finders/ci/daily_build_group_report_results_finder_spec.rb
View file @
04fb787e
...
@@ -6,7 +6,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsFinder do
...
@@ -6,7 +6,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsFinder do
describe
'#execute'
do
describe
'#execute'
do
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
let
(
:user_without_permission
)
{
create
(
:user
)
}
let
(
:user_without_permission
)
{
create
(
:user
)
}
let_it_be
(
:user_with_permission
)
{
project
.
owner
}
let_it_be
(
:user_with_permission
)
{
project
.
first_
owner
}
let_it_be
(
:ref_path
)
{
'refs/heads/master'
}
let_it_be
(
:ref_path
)
{
'refs/heads/master'
}
let
(
:limit
)
{
nil
}
let
(
:limit
)
{
nil
}
let_it_be
(
:default_branch
)
{
false
}
let_it_be
(
:default_branch
)
{
false
}
...
...
spec/finders/merge_request_target_project_finder_spec.rb
View file @
04fb787e
...
@@ -65,8 +65,8 @@ RSpec.describe MergeRequestTargetProjectFinder do
...
@@ -65,8 +65,8 @@ RSpec.describe MergeRequestTargetProjectFinder do
context
'private projects'
do
context
'private projects'
do
let
(
:base_project
)
{
create
(
:project
,
:private
,
path:
'base'
)
}
let
(
:base_project
)
{
create
(
:project
,
:private
,
path:
'base'
)
}
let
(
:forked_project
)
{
fork_project
(
base_project
,
base_project
.
owner
)
}
let
(
:forked_project
)
{
fork_project
(
base_project
,
base_project
.
first_
owner
)
}
let
(
:other_fork
)
{
fork_project
(
base_project
,
base_project
.
owner
)
}
let
(
:other_fork
)
{
fork_project
(
base_project
,
base_project
.
first_
owner
)
}
context
'when the user is a member of all projects'
do
context
'when the user is a member of all projects'
do
before
do
before
do
...
...
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