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
97a7e72f
Commit
97a7e72f
authored
Jan 07, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change set to let_it_be in spec/services
Contributes to
https://gitlab.com/gitlab-org/gitlab/issues/27922
parent
249e94f7
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
143 additions
and
143 deletions
+143
-143
spec/services/auto_merge_service_spec.rb
spec/services/auto_merge_service_spec.rb
+2
-2
spec/services/award_emojis/add_service_spec.rb
spec/services/award_emojis/add_service_spec.rb
+3
-3
spec/services/award_emojis/destroy_service_spec.rb
spec/services/award_emojis/destroy_service_spec.rb
+3
-3
spec/services/award_emojis/toggle_service_spec.rb
spec/services/award_emojis/toggle_service_spec.rb
+3
-3
spec/services/boards/issues/move_service_spec.rb
spec/services/boards/issues/move_service_spec.rb
+8
-8
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+1
-1
spec/services/ci/ensure_stage_service_spec.rb
spec/services/ci/ensure_stage_service_spec.rb
+2
-2
spec/services/ci/expire_pipeline_cache_service_spec.rb
spec/services/ci/expire_pipeline_cache_service_spec.rb
+3
-3
spec/services/ci/register_job_service_spec.rb
spec/services/ci/register_job_service_spec.rb
+3
-3
spec/services/ci/retry_build_service_spec.rb
spec/services/ci/retry_build_service_spec.rb
+3
-3
spec/services/error_tracking/list_issues_service_spec.rb
spec/services/error_tracking/list_issues_service_spec.rb
+2
-2
spec/services/error_tracking/list_projects_service_spec.rb
spec/services/error_tracking/list_projects_service_spec.rb
+2
-2
spec/services/external_pull_requests/create_pipeline_service_spec.rb
...es/external_pull_requests/create_pipeline_service_spec.rb
+2
-2
spec/services/git/branch_push_service_spec.rb
spec/services/git/branch_push_service_spec.rb
+2
-2
spec/services/groups/auto_devops_service_spec.rb
spec/services/groups/auto_devops_service_spec.rb
+2
-2
spec/services/issues/referenced_merge_requests_service_spec.rb
...services/issues/referenced_merge_requests_service_spec.rb
+8
-8
spec/services/issues/reorder_service_spec.rb
spec/services/issues/reorder_service_spec.rb
+3
-3
spec/services/issues/zoom_link_service_spec.rb
spec/services/issues/zoom_link_service_spec.rb
+2
-2
spec/services/merge_requests/create_pipeline_service_spec.rb
spec/services/merge_requests/create_pipeline_service_spec.rb
+2
-2
spec/services/merge_requests/merge_service_spec.rb
spec/services/merge_requests/merge_service_spec.rb
+2
-2
spec/services/merge_requests/merge_to_ref_service_spec.rb
spec/services/merge_requests/merge_to_ref_service_spec.rb
+2
-2
spec/services/metrics/dashboard/custom_metric_embed_service_spec.rb
...ces/metrics/dashboard/custom_metric_embed_service_spec.rb
+3
-3
spec/services/metrics/dashboard/default_embed_service_spec.rb
.../services/metrics/dashboard/default_embed_service_spec.rb
+3
-3
spec/services/metrics/dashboard/dynamic_embed_service_spec.rb
.../services/metrics/dashboard/dynamic_embed_service_spec.rb
+3
-3
spec/services/metrics/dashboard/project_dashboard_service_spec.rb
...vices/metrics/dashboard/project_dashboard_service_spec.rb
+3
-3
spec/services/metrics/dashboard/system_dashboard_service_spec.rb
...rvices/metrics/dashboard/system_dashboard_service_spec.rb
+3
-3
spec/services/notes/create_service_spec.rb
spec/services/notes/create_service_spec.rb
+10
-10
spec/services/notes/destroy_service_spec.rb
spec/services/notes/destroy_service_spec.rb
+2
-2
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+9
-9
spec/services/projects/container_repository/cleanup_tags_service_spec.rb
...rojects/container_repository/cleanup_tags_service_spec.rb
+3
-3
spec/services/projects/container_repository/delete_tags_service_spec.rb
...projects/container_repository/delete_tags_service_spec.rb
+3
-3
spec/services/projects/container_repository/destroy_service_spec.rb
...ces/projects/container_repository/destroy_service_spec.rb
+2
-2
spec/services/projects/detect_repository_languages_service_spec.rb
...ices/projects/detect_repository_languages_service_spec.rb
+2
-2
spec/services/projects/gitlab_projects_import_service_spec.rb
.../services/projects/gitlab_projects_import_service_spec.rb
+1
-1
spec/services/projects/housekeeping_service_spec.rb
spec/services/projects/housekeeping_service_spec.rb
+1
-1
spec/services/projects/open_merge_requests_count_service_spec.rb
...rvices/projects/open_merge_requests_count_service_spec.rb
+1
-1
spec/services/projects/operations/update_service_spec.rb
spec/services/projects/operations/update_service_spec.rb
+2
-2
spec/services/projects/participants_service_spec.rb
spec/services/projects/participants_service_spec.rb
+14
-14
spec/services/projects/update_pages_service_spec.rb
spec/services/projects/update_pages_service_spec.rb
+3
-3
spec/services/prometheus/proxy_service_spec.rb
spec/services/prometheus/proxy_service_spec.rb
+2
-2
spec/services/resource_events/change_labels_service_spec.rb
spec/services/resource_events/change_labels_service_spec.rb
+2
-2
spec/services/resource_events/merge_into_notes_service_spec.rb
...services/resource_events/merge_into_notes_service_spec.rb
+5
-5
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+3
-3
spec/services/system_notes/commit_service_spec.rb
spec/services/system_notes/commit_service_spec.rb
+3
-3
No files found.
spec/services/auto_merge_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
AutoMergeService
do
describe
AutoMergeService
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
)
}
describe
'.all_strategies'
do
describe
'.all_strategies'
do
...
...
spec/services/award_emojis/add_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
AwardEmojis
::
AddService
do
describe
AwardEmojis
::
AddService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:awardable
)
{
create
(
:note
,
project:
project
)
}
let_it_be
(
:awardable
)
{
create
(
:note
,
project:
project
)
}
let
(
:name
)
{
'thumbsup'
}
let
(
:name
)
{
'thumbsup'
}
subject
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
subject
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
...
...
spec/services/award_emojis/destroy_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
AwardEmojis
::
DestroyService
do
describe
AwardEmojis
::
DestroyService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:awardable
)
{
create
(
:note
)
}
let_it_be
(
:awardable
)
{
create
(
:note
)
}
set
(
:project
)
{
awardable
.
project
}
let_it_be
(
:project
)
{
awardable
.
project
}
let
(
:name
)
{
'thumbsup'
}
let
(
:name
)
{
'thumbsup'
}
let!
(
:award_from_other_user
)
do
let!
(
:award_from_other_user
)
do
create
(
:award_emoji
,
name:
name
,
awardable:
awardable
,
user:
create
(
:user
))
create
(
:award_emoji
,
name:
name
,
awardable:
awardable
,
user:
create
(
:user
))
...
...
spec/services/award_emojis/toggle_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
AwardEmojis
::
ToggleService
do
describe
AwardEmojis
::
ToggleService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
set
(
:awardable
)
{
create
(
:note
,
project:
project
)
}
let_it_be
(
:awardable
)
{
create
(
:note
,
project:
project
)
}
let
(
:name
)
{
'thumbsup'
}
let
(
:name
)
{
'thumbsup'
}
subject
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
subject
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
...
...
spec/services/boards/issues/move_service_spec.rb
View file @
97a7e72f
...
@@ -54,14 +54,14 @@ describe Boards::Issues::MoveService do
...
@@ -54,14 +54,14 @@ describe Boards::Issues::MoveService do
end
end
describe
'#execute_multiple'
do
describe
'#execute_multiple'
do
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
set
(
:board1
)
{
create
(
:board
,
group:
group
)
}
let_it_be
(
:board1
)
{
create
(
:board
,
group:
group
)
}
set
(
:development
)
{
create
(
:group_label
,
group:
group
,
name:
'Development'
)
}
let_it_be
(
:development
)
{
create
(
:group_label
,
group:
group
,
name:
'Development'
)
}
set
(
:testing
)
{
create
(
:group_label
,
group:
group
,
name:
'Testing'
)
}
let_it_be
(
:testing
)
{
create
(
:group_label
,
group:
group
,
name:
'Testing'
)
}
set
(
:list1
)
{
create
(
:list
,
board:
board1
,
label:
development
,
position:
0
)
}
let_it_be
(
:list1
)
{
create
(
:list
,
board:
board1
,
label:
development
,
position:
0
)
}
set
(
:list2
)
{
create
(
:list
,
board:
board1
,
label:
testing
,
position:
1
)
}
let_it_be
(
:list2
)
{
create
(
:list
,
board:
board1
,
label:
testing
,
position:
1
)
}
let
(
:params
)
{
{
board_id:
board1
.
id
,
from_list_id:
list1
.
id
,
to_list_id:
list2
.
id
}
}
let
(
:params
)
{
{
board_id:
board1
.
id
,
from_list_id:
list1
.
id
,
to_list_id:
list2
.
id
}
}
before
do
before
do
...
...
spec/services/ci/create_pipeline_service_spec.rb
View file @
97a7e72f
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
Ci
::
CreatePipelineService
do
describe
Ci
::
CreatePipelineService
do
include
ProjectForksHelper
include
ProjectForksHelper
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:admin
)
}
let
(
:user
)
{
create
(
:admin
)
}
let
(
:ref_name
)
{
'refs/heads/master'
}
let
(
:ref_name
)
{
'refs/heads/master'
}
...
...
spec/services/ci/ensure_stage_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
Ci
::
EnsureStageService
,
'#execute'
do
describe
Ci
::
EnsureStageService
,
'#execute'
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:stage
)
{
create
(
:ci_stage_entity
)
}
let
(
:stage
)
{
create
(
:ci_stage_entity
)
}
let
(
:job
)
{
build
(
:ci_build
)
}
let
(
:job
)
{
build
(
:ci_build
)
}
...
...
spec/services/ci/expire_pipeline_cache_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
Ci
::
ExpirePipelineCacheService
do
describe
Ci
::
ExpirePipelineCacheService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
subject
{
described_class
.
new
}
subject
{
described_class
.
new
}
describe
'#execute'
do
describe
'#execute'
do
...
...
spec/services/ci/register_job_service_spec.rb
View file @
97a7e72f
...
@@ -4,9 +4,9 @@ require 'spec_helper'
...
@@ -4,9 +4,9 @@ require 'spec_helper'
module
Ci
module
Ci
describe
RegisterJobService
do
describe
RegisterJobService
do
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
set
(
:project
)
{
create
(
:project
,
group:
group
,
shared_runners_enabled:
false
,
group_runners_enabled:
false
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
group:
group
,
shared_runners_enabled:
false
,
group_runners_enabled:
false
)
}
set
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let!
(
:shared_runner
)
{
create
(
:ci_runner
,
:instance
)
}
let!
(
:shared_runner
)
{
create
(
:ci_runner
,
:instance
)
}
let!
(
:specific_runner
)
{
create
(
:ci_runner
,
:project
,
projects:
[
project
])
}
let!
(
:specific_runner
)
{
create
(
:ci_runner
,
:project
,
projects:
[
project
])
}
let!
(
:group_runner
)
{
create
(
:ci_runner
,
:group
,
groups:
[
group
])
}
let!
(
:group_runner
)
{
create
(
:ci_runner
,
:group
,
groups:
[
group
])
}
...
...
spec/services/ci/retry_build_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
Ci
::
RetryBuildService
do
describe
Ci
::
RetryBuildService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:pipeline
)
do
let_it_be
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
create
(
:ci_pipeline
,
project:
project
,
sha:
'b83d6e391c22777fca1ed3012fce84f633d7fed0'
)
sha:
'b83d6e391c22777fca1ed3012fce84f633d7fed0'
)
end
end
...
...
spec/services/error_tracking/list_issues_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
ErrorTracking
::
ListIssuesService
do
describe
ErrorTracking
::
ListIssuesService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:params
)
{
{
search_term:
'something'
,
sort:
'last_seen'
,
cursor:
'some-cursor'
}
}
let
(
:params
)
{
{
search_term:
'something'
,
sort:
'last_seen'
,
cursor:
'some-cursor'
}
}
let
(
:list_sentry_issues_args
)
do
let
(
:list_sentry_issues_args
)
do
{
{
...
...
spec/services/error_tracking/list_projects_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
ErrorTracking
::
ListProjectsService
do
describe
ErrorTracking
::
ListProjectsService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
)
}
let
(
:sentry_url
)
{
'https://sentrytest.gitlab.com/api/0/projects/sentry-org/sentry-project'
}
let
(
:sentry_url
)
{
'https://sentrytest.gitlab.com/api/0/projects/sentry-org/sentry-project'
}
let
(
:token
)
{
'test-token'
}
let
(
:token
)
{
'test-token'
}
...
...
spec/services/external_pull_requests/create_pipeline_service_spec.rb
View file @
97a7e72f
...
@@ -4,8 +4,8 @@ require 'spec_helper'
...
@@ -4,8 +4,8 @@ require 'spec_helper'
describe
ExternalPullRequests
::
CreatePipelineService
do
describe
ExternalPullRequests
::
CreatePipelineService
do
describe
'#execute'
do
describe
'#execute'
do
set
(
:project
)
{
create
(
:project
,
:auto_devops
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:auto_devops
,
:repository
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:pull_request
)
{
create
(
:external_pull_request
,
project:
project
)
}
let
(
:pull_request
)
{
create
(
:external_pull_request
,
project:
project
)
}
before
do
before
do
...
...
spec/services/git/branch_push_service_spec.rb
View file @
97a7e72f
...
@@ -5,8 +5,8 @@ require 'spec_helper'
...
@@ -5,8 +5,8 @@ require 'spec_helper'
describe
Git
::
BranchPushService
,
services:
true
do
describe
Git
::
BranchPushService
,
services:
true
do
include
RepoHelpers
include
RepoHelpers
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:repository
)
}
let
(
:blankrev
)
{
Gitlab
::
Git
::
BLANK_SHA
}
let
(
:blankrev
)
{
Gitlab
::
Git
::
BLANK_SHA
}
let
(
:oldrev
)
{
sample_commit
.
parent_id
}
let
(
:oldrev
)
{
sample_commit
.
parent_id
}
let
(
:newrev
)
{
sample_commit
.
id
}
let
(
:newrev
)
{
sample_commit
.
id
}
...
...
spec/services/groups/auto_devops_service_spec.rb
View file @
97a7e72f
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
require
'spec_helper'
require
'spec_helper'
describe
Groups
::
AutoDevopsService
,
'#execute'
do
describe
Groups
::
AutoDevopsService
,
'#execute'
do
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:group_params
)
{
{
auto_devops_enabled:
'0'
}
}
let
(
:group_params
)
{
{
auto_devops_enabled:
'0'
}
}
let
(
:service
)
{
described_class
.
new
(
group
,
user
,
group_params
)
}
let
(
:service
)
{
described_class
.
new
(
group
,
user
,
group_params
)
}
...
...
spec/services/issues/referenced_merge_requests_service_spec.rb
View file @
97a7e72f
...
@@ -15,16 +15,16 @@ describe Issues::ReferencedMergeRequestsService do
...
@@ -15,16 +15,16 @@ describe Issues::ReferencedMergeRequestsService do
end
end
end
end
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
set
(
:other_project
)
{
create
(
:project
,
:public
,
:repository
)
}
let_it_be
(
:other_project
)
{
create
(
:project
,
:public
,
:repository
)
}
set
(
:issue
)
{
create
(
:issue
,
author:
user
,
project:
project
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
author:
user
,
project:
project
)
}
set
(
:closing_mr
)
{
create_closing_mr
(
source_project:
project
)
}
let_it_be
(
:closing_mr
)
{
create_closing_mr
(
source_project:
project
)
}
set
(
:closing_mr_other_project
)
{
create_closing_mr
(
source_project:
other_project
)
}
let_it_be
(
:closing_mr_other_project
)
{
create_closing_mr
(
source_project:
other_project
)
}
set
(
:referencing_mr
)
{
create_referencing_mr
(
source_project:
project
,
source_branch:
'csv'
)
}
let_it_be
(
:referencing_mr
)
{
create_referencing_mr
(
source_project:
project
,
source_branch:
'csv'
)
}
set
(
:referencing_mr_other_project
)
{
create_referencing_mr
(
source_project:
other_project
,
source_branch:
'csv'
)
}
let_it_be
(
:referencing_mr_other_project
)
{
create_referencing_mr
(
source_project:
other_project
,
source_branch:
'csv'
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
)
}
...
...
spec/services/issues/reorder_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
Issues
::
ReorderService
do
describe
Issues
::
ReorderService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
shared_examples
'issues reorder service'
do
shared_examples
'issues reorder service'
do
context
'when reordering issues'
do
context
'when reordering issues'
do
...
...
spec/services/issues/zoom_link_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
Issues
::
ZoomLinkService
do
describe
Issues
::
ZoomLinkService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:issue
)
{
create
(
:issue
)
}
let_it_be
(
:issue
)
{
create
(
:issue
)
}
let
(
:project
)
{
issue
.
project
}
let
(
:project
)
{
issue
.
project
}
let
(
:service
)
{
described_class
.
new
(
issue
,
user
)
}
let
(
:service
)
{
described_class
.
new
(
issue
,
user
)
}
...
...
spec/services/merge_requests/create_pipeline_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
MergeRequests
::
CreatePipelineService
do
describe
MergeRequests
::
CreatePipelineService
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
let
(
:params
)
{
{}
}
let
(
:params
)
{
{}
}
...
...
spec/services/merge_requests/merge_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
MergeRequests
::
MergeService
do
describe
MergeRequests
::
MergeService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:user2
)
{
create
(
:user
)
}
let_it_be
(
:user2
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
,
author:
user2
,
assignees:
[
user2
])
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
,
author:
user2
,
assignees:
[
user2
])
}
let
(
:project
)
{
merge_request
.
project
}
let
(
:project
)
{
merge_request
.
project
}
...
...
spec/services/merge_requests/merge_to_ref_service_spec.rb
View file @
97a7e72f
...
@@ -67,7 +67,7 @@ describe MergeRequests::MergeToRefService do
...
@@ -67,7 +67,7 @@ describe MergeRequests::MergeToRefService do
end
end
end
end
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
)
}
let
(
:project
)
{
merge_request
.
project
}
let
(
:project
)
{
merge_request
.
project
}
...
@@ -214,7 +214,7 @@ describe MergeRequests::MergeToRefService do
...
@@ -214,7 +214,7 @@ describe MergeRequests::MergeToRefService do
end
end
describe
'cascading merge refs'
do
describe
'cascading merge refs'
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:params
)
{
{
commit_message:
'Cascading merge'
,
first_parent_ref:
first_parent_ref
,
target_ref:
target_ref
,
sha:
merge_request
.
diff_head_sha
}
}
let
(
:params
)
{
{
commit_message:
'Cascading merge'
,
first_parent_ref:
first_parent_ref
,
target_ref:
target_ref
,
sha:
merge_request
.
diff_head_sha
}
}
context
'when first merge happens'
do
context
'when first merge happens'
do
...
...
spec/services/metrics/dashboard/custom_metric_embed_service_spec.rb
View file @
97a7e72f
...
@@ -5,9 +5,9 @@ require 'spec_helper'
...
@@ -5,9 +5,9 @@ require 'spec_helper'
describe
Metrics
::
Dashboard
::
CustomMetricEmbedService
do
describe
Metrics
::
Dashboard
::
CustomMetricEmbedService
do
include
MetricsDashboardHelpers
include
MetricsDashboardHelpers
set
(
:project
)
{
build
(
:project
)
}
let_it_be
(
:project
,
reload:
true
)
{
build
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
...
...
spec/services/metrics/dashboard/default_embed_service_spec.rb
View file @
97a7e72f
...
@@ -5,9 +5,9 @@ require 'spec_helper'
...
@@ -5,9 +5,9 @@ require 'spec_helper'
describe
Metrics
::
Dashboard
::
DefaultEmbedService
,
:use_clean_rails_memory_store_caching
do
describe
Metrics
::
Dashboard
::
DefaultEmbedService
,
:use_clean_rails_memory_store_caching
do
include
MetricsDashboardHelpers
include
MetricsDashboardHelpers
set
(
:project
)
{
build
(
:project
)
}
let_it_be
(
:project
)
{
build
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
...
...
spec/services/metrics/dashboard/dynamic_embed_service_spec.rb
View file @
97a7e72f
...
@@ -5,9 +5,9 @@ require 'spec_helper'
...
@@ -5,9 +5,9 @@ require 'spec_helper'
describe
Metrics
::
Dashboard
::
DynamicEmbedService
,
:use_clean_rails_memory_store_caching
do
describe
Metrics
::
Dashboard
::
DynamicEmbedService
,
:use_clean_rails_memory_store_caching
do
include
MetricsDashboardHelpers
include
MetricsDashboardHelpers
set
(
:project
)
{
build
(
:project
)
}
let_it_be
(
:project
)
{
build
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
...
...
spec/services/metrics/dashboard/project_dashboard_service_spec.rb
View file @
97a7e72f
...
@@ -5,9 +5,9 @@ require 'spec_helper'
...
@@ -5,9 +5,9 @@ require 'spec_helper'
describe
Metrics
::
Dashboard
::
ProjectDashboardService
,
:use_clean_rails_memory_store_caching
do
describe
Metrics
::
Dashboard
::
ProjectDashboardService
,
:use_clean_rails_memory_store_caching
do
include
MetricsDashboardHelpers
include
MetricsDashboardHelpers
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
...
...
spec/services/metrics/dashboard/system_dashboard_service_spec.rb
View file @
97a7e72f
...
@@ -5,9 +5,9 @@ require 'spec_helper'
...
@@ -5,9 +5,9 @@ require 'spec_helper'
describe
Metrics
::
Dashboard
::
SystemDashboardService
,
:use_clean_rails_memory_store_caching
do
describe
Metrics
::
Dashboard
::
SystemDashboardService
,
:use_clean_rails_memory_store_caching
do
include
MetricsDashboardHelpers
include
MetricsDashboardHelpers
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
...
...
spec/services/notes/create_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
Notes
::
CreateService
do
describe
Notes
::
CreateService
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:opts
)
do
let
(
:opts
)
do
{
note:
'Awesome comment'
,
noteable_type:
'Issue'
,
noteable_id:
issue
.
id
}
{
note:
'Awesome comment'
,
noteable_type:
'Issue'
,
noteable_id:
issue
.
id
}
end
end
...
@@ -216,12 +216,12 @@ describe Notes::CreateService do
...
@@ -216,12 +216,12 @@ describe Notes::CreateService do
context
'note with commands'
do
context
'note with commands'
do
context
'all quick actions'
do
context
'all quick actions'
do
set
(
:milestone
)
{
create
(
:milestone
,
project:
project
,
title:
"sprint"
)
}
let_it_be
(
:milestone
)
{
create
(
:milestone
,
project:
project
,
title:
"sprint"
)
}
set
(
:bug_label
)
{
create
(
:label
,
project:
project
,
title:
'bug'
)
}
let_it_be
(
:bug_label
)
{
create
(
:label
,
project:
project
,
title:
'bug'
)
}
set
(
:to_be_copied_label
)
{
create
(
:label
,
project:
project
,
title:
'to be copied'
)
}
let_it_be
(
:to_be_copied_label
)
{
create
(
:label
,
project:
project
,
title:
'to be copied'
)
}
set
(
:feature_label
)
{
create
(
:label
,
project:
project
,
title:
'feature'
)
}
let_it_be
(
:feature_label
)
{
create
(
:label
,
project:
project
,
title:
'feature'
)
}
set
(
:iss
ue
)
{
create
(
:issue
,
project:
project
,
labels:
[
bug_label
],
due_date:
'2019-01-01'
)
}
let_it_be
(
:issue
,
reload:
tr
ue
)
{
create
(
:issue
,
project:
project
,
labels:
[
bug_label
],
due_date:
'2019-01-01'
)
}
set
(
:issue_2
)
{
create
(
:issue
,
project:
project
,
labels:
[
bug_label
,
to_be_copied_label
])
}
let_it_be
(
:issue_2
)
{
create
(
:issue
,
project:
project
,
labels:
[
bug_label
,
to_be_copied_label
])
}
context
'for issues'
do
context
'for issues'
do
let
(
:issuable
)
{
issue
}
let
(
:issuable
)
{
issue
}
...
@@ -272,7 +272,7 @@ describe Notes::CreateService do
...
@@ -272,7 +272,7 @@ describe Notes::CreateService do
end
end
context
'for merge requests'
do
context
'for merge requests'
do
set
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
,
labels:
[
bug_label
])
}
let_it_be
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
,
labels:
[
bug_label
])
}
let
(
:issuable
)
{
merge_request
}
let
(
:issuable
)
{
merge_request
}
let
(
:note_params
)
{
opts
.
merge
(
noteable_type:
'MergeRequest'
,
noteable_id:
merge_request
.
id
)
}
let
(
:note_params
)
{
opts
.
merge
(
noteable_type:
'MergeRequest'
,
noteable_id:
merge_request
.
id
)
}
let
(
:merge_request_quick_actions
)
do
let
(
:merge_request_quick_actions
)
do
...
...
spec/services/notes/destroy_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
Notes
::
DestroyService
do
describe
Notes
::
DestroyService
do
set
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
set
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:user
)
{
issue
.
author
}
let
(
:user
)
{
issue
.
author
}
describe
'#execute'
do
describe
'#execute'
do
...
...
spec/services/notification_service_spec.rb
View file @
97a7e72f
...
@@ -155,7 +155,7 @@ describe NotificationService, :mailer do
...
@@ -155,7 +155,7 @@ describe NotificationService, :mailer do
describe
'#async'
do
describe
'#async'
do
let
(
:async
)
{
notification
.
async
}
let
(
:async
)
{
notification
.
async
}
set
(
:key
)
{
create
(
:personal_key
)
}
let_it_be
(
:key
)
{
create
(
:personal_key
)
}
it
'returns an Async object with the correct parent'
do
it
'returns an Async object with the correct parent'
do
expect
(
async
).
to
be_a
(
described_class
::
Async
)
expect
(
async
).
to
be_a
(
described_class
::
Async
)
...
@@ -2508,14 +2508,14 @@ describe NotificationService, :mailer do
...
@@ -2508,14 +2508,14 @@ describe NotificationService, :mailer do
end
end
describe
'Pages domains'
do
describe
'Pages domains'
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
)
}
set
(
:domain
)
{
create
(
:pages_domain
,
project:
project
)
}
let_it_be
(
:domain
,
reload:
true
)
{
create
(
:pages_domain
,
project:
project
)
}
set
(
:u_blocked
)
{
create
(
:user
,
:blocked
)
}
let_it_be
(
:u_blocked
)
{
create
(
:user
,
:blocked
)
}
set
(
:u_silence
)
{
create_user_with_notification
(
:disabled
,
'silent'
,
project
)
}
let_it_be
(
:u_silence
)
{
create_user_with_notification
(
:disabled
,
'silent'
,
project
)
}
set
(
:u_owner
)
{
project
.
owner
}
let_it_be
(
:u_owner
)
{
project
.
owner
}
set
(
:u_maintainer1
)
{
create
(
:user
)
}
let_it_be
(
:u_maintainer1
)
{
create
(
:user
)
}
set
(
:u_maintainer2
)
{
create
(
:user
)
}
let_it_be
(
:u_maintainer2
)
{
create
(
:user
)
}
set
(
:u_developer
)
{
create
(
:user
)
}
let_it_be
(
:u_developer
)
{
create
(
:user
)
}
before
do
before
do
project
.
add_maintainer
(
u_blocked
)
project
.
add_maintainer
(
u_blocked
)
...
...
spec/services/projects/container_repository/cleanup_tags_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
Projects
::
ContainerRepository
::
CleanupTagsService
do
describe
Projects
::
ContainerRepository
::
CleanupTagsService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
set
(
:repository
)
{
create
(
:container_repository
,
:root
,
project:
project
)
}
let_it_be
(
:repository
)
{
create
(
:container_repository
,
:root
,
project:
project
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
...
...
spec/services/projects/container_repository/delete_tags_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
Projects
::
ContainerRepository
::
DeleteTagsService
do
describe
Projects
::
ContainerRepository
::
DeleteTagsService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
set
(
:repository
)
{
create
(
:container_repository
,
:root
,
project:
project
)
}
let_it_be
(
:repository
)
{
create
(
:container_repository
,
:root
,
project:
project
)
}
let
(
:params
)
{
{
tags:
tags
}
}
let
(
:params
)
{
{
tags:
tags
}
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
...
...
spec/services/projects/container_repository/destroy_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
Projects
::
ContainerRepository
::
DestroyService
do
describe
Projects
::
ContainerRepository
::
DestroyService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
subject
{
described_class
.
new
(
project
,
user
)
}
subject
{
described_class
.
new
(
project
,
user
)
}
...
...
spec/services/projects/detect_repository_languages_service_spec.rb
View file @
97a7e72f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
'spec_helper'
describe
Projects
::
DetectRepositoryLanguagesService
,
:clean_gitlab_redis_shared_state
do
describe
Projects
::
DetectRepositoryLanguagesService
,
:clean_gitlab_redis_shared_state
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:repository
)
}
subject
{
described_class
.
new
(
project
)
}
subject
{
described_class
.
new
(
project
)
}
...
@@ -51,7 +51,7 @@ describe Projects::DetectRepositoryLanguagesService, :clean_gitlab_redis_shared_
...
@@ -51,7 +51,7 @@ describe Projects::DetectRepositoryLanguagesService, :clean_gitlab_redis_shared_
end
end
context
'when no repository exists'
do
context
'when no repository exists'
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
it
'has no languages'
do
it
'has no languages'
do
expect
(
subject
.
execute
).
to
be_empty
expect
(
subject
.
execute
).
to
be_empty
...
...
spec/services/projects/gitlab_projects_import_service_spec.rb
View file @
97a7e72f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
'spec_helper'
describe
Projects
::
GitlabProjectsImportService
do
describe
Projects
::
GitlabProjectsImportService
do
set
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let
(
:path
)
{
'test-path'
}
let
(
:path
)
{
'test-path'
}
let
(
:file
)
{
fixture_file_upload
(
'spec/fixtures/project_export.tar.gz'
)
}
let
(
:file
)
{
fixture_file_upload
(
'spec/fixtures/project_export.tar.gz'
)
}
let
(
:overwrite
)
{
false
}
let
(
:overwrite
)
{
false
}
...
...
spec/services/projects/housekeeping_service_spec.rb
View file @
97a7e72f
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
Projects
::
HousekeepingService
do
describe
Projects
::
HousekeepingService
do
subject
{
described_class
.
new
(
project
)
}
subject
{
described_class
.
new
(
project
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
project
.
reset_pushes_since_gc
project
.
reset_pushes_since_gc
...
...
spec/services/projects/open_merge_requests_count_service_spec.rb
View file @
97a7e72f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
'spec_helper'
describe
Projects
::
OpenMergeRequestsCountService
,
:use_clean_rails_memory_store_caching
do
describe
Projects
::
OpenMergeRequestsCountService
,
:use_clean_rails_memory_store_caching
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
subject
{
described_class
.
new
(
project
)
}
subject
{
described_class
.
new
(
project
)
}
...
...
spec/services/projects/operations/update_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
Projects
::
Operations
::
UpdateService
do
describe
Projects
::
Operations
::
UpdateService
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
)
}
let
(
:result
)
{
subject
.
execute
}
let
(
:result
)
{
subject
.
execute
}
...
...
spec/services/projects/participants_service_spec.rb
View file @
97a7e72f
...
@@ -4,8 +4,8 @@ require 'spec_helper'
...
@@ -4,8 +4,8 @@ require 'spec_helper'
describe
Projects
::
ParticipantsService
do
describe
Projects
::
ParticipantsService
do
describe
'#groups'
do
describe
'#groups'
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
)
}
it
'avoids N+1 queries'
do
it
'avoids N+1 queries'
do
...
@@ -62,10 +62,10 @@ describe Projects::ParticipantsService do
...
@@ -62,10 +62,10 @@ describe Projects::ParticipantsService do
subject
(
:usernames
)
{
service
.
project_members
.
map
{
|
member
|
member
[
:username
]
}
}
subject
(
:usernames
)
{
service
.
project_members
.
map
{
|
member
|
member
[
:username
]
}
}
context
'when there is a project in group namespace'
do
context
'when there is a project in group namespace'
do
set
(
:public_group
)
{
create
(
:group
,
:public
)
}
let_it_be
(
:public_group
)
{
create
(
:group
,
:public
)
}
set
(
:public_project
)
{
create
(
:project
,
:public
,
namespace:
public_group
)}
let_it_be
(
:public_project
)
{
create
(
:project
,
:public
,
namespace:
public_group
)}
set
(
:public_group_owner
)
{
create
(
:user
)
}
let_it_be
(
:public_group_owner
)
{
create
(
:user
)
}
let
(
:service
)
{
described_class
.
new
(
public_project
,
create
(
:user
))
}
let
(
:service
)
{
described_class
.
new
(
public_project
,
create
(
:user
))
}
...
@@ -79,18 +79,18 @@ describe Projects::ParticipantsService do
...
@@ -79,18 +79,18 @@ describe Projects::ParticipantsService do
end
end
context
'when there is a private group and a public project'
do
context
'when there is a private group and a public project'
do
set
(
:public_group
)
{
create
(
:group
,
:public
)
}
let_it_be
(
:public_group
)
{
create
(
:group
,
:public
)
}
set
(
:private_group
)
{
create
(
:group
,
:private
,
:nested
)
}
let_it_be
(
:private_group
)
{
create
(
:group
,
:private
,
:nested
)
}
set
(
:public_project
)
{
create
(
:project
,
:public
,
namespace:
public_group
)}
let_it_be
(
:public_project
)
{
create
(
:project
,
:public
,
namespace:
public_group
)}
set
(
:project_issue
)
{
create
(
:issue
,
project:
public_project
)}
let_it_be
(
:project_issue
)
{
create
(
:issue
,
project:
public_project
)}
set
(
:public_group_owner
)
{
create
(
:user
)
}
let_it_be
(
:public_group_owner
)
{
create
(
:user
)
}
set
(
:private_group_member
)
{
create
(
:user
)
}
let_it_be
(
:private_group_member
)
{
create
(
:user
)
}
set
(
:public_project_maintainer
)
{
create
(
:user
)
}
let_it_be
(
:public_project_maintainer
)
{
create
(
:user
)
}
set
(
:private_group_owner
)
{
create
(
:user
)
}
let_it_be
(
:private_group_owner
)
{
create
(
:user
)
}
set
(
:group_ancestor_owner
)
{
create
(
:user
)
}
let_it_be
(
:group_ancestor_owner
)
{
create
(
:user
)
}
before
(
:context
)
do
before
(
:context
)
do
public_group
.
add_owner
public_group_owner
public_group
.
add_owner
public_group_owner
...
...
spec/services/projects/update_pages_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
"spec_helper"
require
"spec_helper"
describe
Projects
::
UpdatePagesService
do
describe
Projects
::
UpdatePagesService
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
,
refind:
true
)
{
create
(
:project
,
:repository
)
}
set
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
(
'HEAD'
).
sha
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
(
'HEAD'
).
sha
)
}
set
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
ref:
'HEAD'
)
}
let_it_be
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
ref:
'HEAD'
)
}
let
(
:invalid_file
)
{
fixture_file_upload
(
'spec/fixtures/dk.png'
)
}
let
(
:invalid_file
)
{
fixture_file_upload
(
'spec/fixtures/dk.png'
)
}
let
(
:file
)
{
fixture_file_upload
(
"spec/fixtures/pages.zip"
)
}
let
(
:file
)
{
fixture_file_upload
(
"spec/fixtures/pages.zip"
)
}
...
...
spec/services/prometheus/proxy_service_spec.rb
View file @
97a7e72f
...
@@ -5,8 +5,8 @@ require 'spec_helper'
...
@@ -5,8 +5,8 @@ require 'spec_helper'
describe
Prometheus
::
ProxyService
do
describe
Prometheus
::
ProxyService
do
include
ReactiveCachingHelpers
include
ReactiveCachingHelpers
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
describe
'#initialize'
do
describe
'#initialize'
do
let
(
:params
)
{
ActionController
::
Parameters
.
new
(
query:
'1'
).
permit!
}
let
(
:params
)
{
ActionController
::
Parameters
.
new
(
query:
'1'
).
permit!
}
...
...
spec/services/resource_events/change_labels_service_spec.rb
View file @
97a7e72f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
ResourceEvents
::
ChangeLabelsService
do
describe
ResourceEvents
::
ChangeLabelsService
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:author
)
{
create
(
:user
)
}
let_it_be
(
:author
)
{
create
(
:user
)
}
let
(
:resource
)
{
create
(
:issue
,
project:
project
)
}
let
(
:resource
)
{
create
(
:issue
,
project:
project
)
}
describe
'.change_labels'
do
describe
'.change_labels'
do
...
...
spec/services/resource_events/merge_into_notes_service_spec.rb
View file @
97a7e72f
...
@@ -16,11 +16,11 @@ describe ResourceEvents::MergeIntoNotesService do
...
@@ -16,11 +16,11 @@ describe ResourceEvents::MergeIntoNotesService do
create
(
:note_on_issue
,
opts
.
merge
(
params
))
create
(
:note_on_issue
,
opts
.
merge
(
params
))
end
end
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
set
(
:resource
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:resource
)
{
create
(
:issue
,
project:
project
)
}
set
(
:label
)
{
create
(
:label
,
project:
project
)
}
let_it_be
(
:label
)
{
create
(
:label
,
project:
project
)
}
set
(
:label2
)
{
create
(
:label
,
project:
project
)
}
let_it_be
(
:label2
)
{
create
(
:label
,
project:
project
)
}
let
(
:time
)
{
Time
.
now
}
let
(
:time
)
{
Time
.
now
}
describe
'#execute'
do
describe
'#execute'
do
...
...
spec/services/system_note_service_spec.rb
View file @
97a7e72f
...
@@ -7,9 +7,9 @@ describe SystemNoteService do
...
@@ -7,9 +7,9 @@ describe SystemNoteService do
include
RepoHelpers
include
RepoHelpers
include
AssetsHelpers
include
AssetsHelpers
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
set
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
set
(
:author
)
{
create
(
:user
)
}
let_it_be
(
:author
)
{
create
(
:user
)
}
let
(
:noteable
)
{
create
(
:issue
,
project:
project
)
}
let
(
:noteable
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue
)
{
noteable
}
let
(
:issue
)
{
noteable
}
...
...
spec/services/system_notes/commit_service_spec.rb
View file @
97a7e72f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
require
'spec_helper'
require
'spec_helper'
describe
SystemNotes
::
CommitService
do
describe
SystemNotes
::
CommitService
do
set
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
set
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
set
(
:author
)
{
create
(
:user
)
}
let_it_be
(
:author
)
{
create
(
:user
)
}
let
(
:commit_service
)
{
described_class
.
new
(
noteable:
noteable
,
project:
project
,
author:
author
)
}
let
(
:commit_service
)
{
described_class
.
new
(
noteable:
noteable
,
project:
project
,
author:
author
)
}
...
...
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