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
f320219a
Commit
f320219a
authored
Jan 22, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rubocop offenses for cops with 1 or 2 offenses
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
ab78d4b1
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
42 additions
and
172 deletions
+42
-172
.rubocop_todo.yml
.rubocop_todo.yml
+1
-123
app/mailers/abuse_report_mailer.rb
app/mailers/abuse_report_mailer.rb
+1
-1
app/mailers/application_mailer.rb
app/mailers/application_mailer.rb
+1
-1
app/mailers/email_rejection_mailer.rb
app/mailers/email_rejection_mailer.rb
+1
-1
app/mailers/notify.rb
app/mailers/notify.rb
+1
-1
app/mailers/repository_check_mailer.rb
app/mailers/repository_check_mailer.rb
+1
-1
app/models/application_setting.rb
app/models/application_setting.rb
+1
-1
app/models/concerns/relative_positioning.rb
app/models/concerns/relative_positioning.rb
+1
-2
app/models/concerns/resolvable_discussion.rb
app/models/concerns/resolvable_discussion.rb
+1
-1
app/models/uploads/base.rb
app/models/uploads/base.rb
+1
-1
config/initializers/rspec_profiling.rb
config/initializers/rspec_profiling.rb
+1
-1
ee/app/mailers/ci_minutes_usage_mailer.rb
ee/app/mailers/ci_minutes_usage_mailer.rb
+1
-1
ee/spec/mailers/emails/service_desk_spec.rb
ee/spec/mailers/emails/service_desk_spec.rb
+1
-1
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+1
-1
lib/api/commit_statuses.rb
lib/api/commit_statuses.rb
+6
-8
lib/backup/manager.rb
lib/backup/manager.rb
+3
-3
lib/gitlab/ci/ansi2html.rb
lib/gitlab/ci/ansi2html.rb
+1
-1
lib/gitlab/cycle_analytics/usage_data.rb
lib/gitlab/cycle_analytics/usage_data.rb
+1
-1
lib/gitlab/git/diff_collection.rb
lib/gitlab/git/diff_collection.rb
+1
-1
lib/gitlab/gpg/commit.rb
lib/gitlab/gpg/commit.rb
+2
-2
lib/gitlab/highlight.rb
lib/gitlab/highlight.rb
+1
-1
lib/gitlab/project_search_results.rb
lib/gitlab/project_search_results.rb
+3
-3
lib/gitlab/project_transfer.rb
lib/gitlab/project_transfer.rb
+1
-1
lib/gitlab/template/base_template.rb
lib/gitlab/template/base_template.rb
+1
-1
lib/system_check/helpers.rb
lib/system_check/helpers.rb
+1
-5
lib/tasks/yarn.rake
lib/tasks/yarn.rake
+1
-0
qa/qa.rb
qa/qa.rb
+1
-1
spec/features/admin/admin_groups_spec.rb
spec/features/admin/admin_groups_spec.rb
+1
-1
spec/lib/gitlab/metrics/dashboard/processor_spec.rb
spec/lib/gitlab/metrics/dashboard/processor_spec.rb
+1
-1
spec/lib/marginalia_spec.rb
spec/lib/marginalia_spec.rb
+1
-1
spec/services/merge_requests/create_from_issue_service_spec.rb
...services/merge_requests/create_from_issue_service_spec.rb
+2
-4
No files found.
.rubocop_todo.yml
View file @
f320219a
...
...
@@ -52,14 +52,6 @@ Layout/ClosingParenthesisIndentation:
-
'
spec/support/helpers/stub_object_storage.rb'
-
'
spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: leading, trailing
Layout/DotPosition
:
Exclude
:
-
'
app/models/concerns/relative_positioning.rb'
# Offense count: 69
# Cop supports --auto-correct.
Layout/EmptyLinesAroundArguments
:
...
...
@@ -100,12 +92,6 @@ Layout/IndentFirstParameter:
-
'
spec/support/helpers/repo_helpers.rb'
-
'
spec/support/helpers/stub_object_storage.rb'
# Offense count: 1
# Cop supports --auto-correct.
Layout/LeadingBlankLines
:
Exclude
:
-
'
lib/tasks/yarn.rake'
# Offense count: 54
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
...
...
@@ -150,11 +136,6 @@ Layout/SpaceInsideBlockBraces:
Layout/SpaceInsideParens
:
Enabled
:
false
# Offense count: 1
Lint/DisjunctiveAssignmentInConstructor
:
Exclude
:
-
'
app/models/uploads/base.rb'
# Offense count: 19
Lint/DuplicateMethods
:
Exclude
:
...
...
@@ -177,21 +158,6 @@ Lint/DuplicateMethods:
Lint/MissingCopEnableDirective
:
Enabled
:
false
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: Whitelist.
# Whitelist: present?, blank?, presence, try, try!
Lint/SafeNavigationConsistency
:
Exclude
:
-
'
lib/gitlab/gpg/commit.rb'
# Offense count: 2
# Cop supports --auto-correct.
Lint/ToJSON
:
Exclude
:
-
'
lib/gitlab/cycle_analytics/usage_data.rb'
-
'
lib/gitlab/template/base_template.rb'
# Offense count: 6
Lint/UriEscapeUnescape
:
Exclude
:
...
...
@@ -200,12 +166,6 @@ Lint/UriEscapeUnescape:
-
'
spec/lib/google_api/auth_spec.rb'
-
'
spec/requests/api/files_spec.rb'
# Offense count: 1
# Configuration parameters: CheckForMethodsWithNoSideEffects.
Lint/Void
:
Exclude
:
-
'
lib/gitlab/git/diff_collection.rb'
# Offense count: 165
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
...
...
@@ -284,12 +244,6 @@ RSpec/LetBeforeExamples:
-
'
spec/rubocop/cop/migration/update_column_in_batches_spec.rb'
-
'
spec/serializers/pipeline_details_entity_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
RSpec/MultipleSubjects
:
Exclude
:
-
'
spec/services/merge_requests/create_from_issue_service_spec.rb'
# Offense count: 2018
# Cop supports --auto-correct.
# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
...
...
@@ -319,12 +273,6 @@ RSpec/ScatteredSetup:
-
'
spec/requests/api/jobs_spec.rb'
-
'
spec/services/projects/create_service_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
RSpec/SharedContext
:
Exclude
:
-
'
spec/features/admin/admin_groups_spec.rb'
# Offense count: 4
RSpec/VoidExpect
:
Exclude
:
...
...
@@ -348,12 +296,6 @@ Rails/ApplicationController:
-
'
spec/controllers/concerns/continue_params_spec.rb'
-
'
spec/lib/marginalia_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Rails/ApplicationMailer
:
Exclude
:
-
'
app/mailers/base_mailer.rb'
# Offense count: 8
# Cop supports --auto-correct.
Rails/BelongsTo
:
...
...
@@ -414,14 +356,6 @@ Rails/LinkToBlank:
Rails/RakeEnvironment
:
Enabled
:
false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/RedundantAllowNil
:
Exclude
:
-
'
app/models/application_setting.rb'
# Offense count: 868
# Configuration parameters: Blacklist, Whitelist.
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
...
...
@@ -457,12 +391,6 @@ Style/CommentedKeyword:
-
'
lib/tasks/gitlab/backup.rake'
-
'
spec/tasks/gitlab/backup_rake_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/Dir
:
Exclude
:
-
'
qa/qa.rb'
# Offense count: 6
# Cop supports --auto-correct.
Style/EachWithObject
:
...
...
@@ -591,13 +519,6 @@ Style/NumericLiteralPrefix:
Style/NumericPredicate
:
Enabled
:
false
# Offense count: 2
# Cop supports --auto-correct.
Style/OrAssignment
:
Exclude
:
-
'
lib/api/commit_statuses.rb'
-
'
lib/gitlab/project_transfer.rb'
# Offense count: 106
# Cop supports --auto-correct.
Style/ParallelAssignment
:
...
...
@@ -632,12 +553,6 @@ Style/PerlBackrefs:
Style/RaiseArgs
:
Enabled
:
false
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantConditional
:
Exclude
:
-
'
lib/system_check/helpers.rb'
# Offense count: 221
# Cop supports --auto-correct.
Style/RedundantFreeze
:
...
...
@@ -704,12 +619,6 @@ Style/SingleLineMethods:
Style/SpecialGlobalVars
:
EnforcedStyle
:
use_perl_names
# Offense count: 1
# Cop supports --auto-correct.
Style/StderrPuts
:
Exclude
:
-
'
config/initializers/rspec_profiling.rb'
# Offense count: 75
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
...
...
@@ -736,30 +645,6 @@ Style/TernaryParentheses:
-
'
spec/requests/api/pipeline_schedules_spec.rb'
-
'
spec/support/capybara.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArrayLiteral
:
Exclude
:
-
'
ee/spec/models/project_spec.rb'
-
'
spec/lib/gitlab/metrics/dashboard/processor_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInHashLiteral
:
Exclude
:
-
'
lib/gitlab/ci/ansi2html.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/UnlessElse
:
Exclude
:
-
'
lib/backup/manager.rb'
-
'
lib/gitlab/project_search_results.rb'
# Offense count: 8
# Cop supports --auto-correct.
Style/UnneededCondition
:
...
...
@@ -776,13 +661,6 @@ Style/UnneededCondition:
Style/UnneededInterpolation
:
Enabled
:
false
# Offense count: 2
# Cop supports --auto-correct.
Style/UnneededSort
:
Exclude
:
-
'
app/models/concerns/resolvable_discussion.rb'
-
'
lib/gitlab/highlight.rb'
RSpec/ReceiveCounts
:
Exclude
:
-
'
ee/spec/models/broadcast_message_spec.rb'
...
...
@@ -907,4 +785,4 @@ RSpec/ContextMethod:
-
'
spec/services/projects/open_issues_count_service_spec.rb'
-
'
spec/services/quick_actions/interpret_service_spec.rb'
-
'
spec/support/shared_examples/services/boards/issues_list_service_shared_examples.rb'
-
'
spec/uploaders/namespace_file_uploader_spec.rb'
\ No newline at end of file
-
'
spec/uploaders/namespace_file_uploader_spec.rb'
app/mailers/abuse_report_mailer.rb
View file @
f320219a
# frozen_string_literal: true
class
AbuseReportMailer
<
Base
Mailer
class
AbuseReportMailer
<
Application
Mailer
layout
'empty_mailer'
helper
EmailsHelper
...
...
app/mailers/
base
_mailer.rb
→
app/mailers/
application
_mailer.rb
View file @
f320219a
# frozen_string_literal: true
class
Base
Mailer
<
ActionMailer
::
Base
class
Application
Mailer
<
ActionMailer
::
Base
around_action
:render_with_default_locale
helper
ApplicationHelper
...
...
app/mailers/email_rejection_mailer.rb
View file @
f320219a
# frozen_string_literal: true
class
EmailRejectionMailer
<
Base
Mailer
class
EmailRejectionMailer
<
Application
Mailer
layout
'empty_mailer'
helper
EmailsHelper
...
...
app/mailers/notify.rb
View file @
f320219a
# frozen_string_literal: true
class
Notify
<
Base
Mailer
class
Notify
<
Application
Mailer
include
ActionDispatch
::
Routing
::
PolymorphicRoutes
include
GitlabRoutingHelper
include
EmailsHelper
...
...
app/mailers/repository_check_mailer.rb
View file @
f320219a
# frozen_string_literal: true
class
RepositoryCheckMailer
<
Base
Mailer
class
RepositoryCheckMailer
<
Application
Mailer
# rubocop: disable CodeReuse/ActiveRecord
layout
'empty_mailer'
...
...
app/models/application_setting.rb
View file @
f320219a
...
...
@@ -142,7 +142,7 @@ class ApplicationSetting < ApplicationRecord
if: :auto_devops_enabled?
validates
:enabled_git_access_protocol
,
inclusion:
{
in:
%w(ssh http)
,
allow_blank:
true
,
allow_nil:
true
}
inclusion:
{
in:
%w(ssh http)
,
allow_blank:
true
}
validates
:domain_blacklist
,
presence:
{
message:
'Domain blacklist cannot be empty if Blacklist is enabled.'
},
...
...
app/models/concerns/relative_positioning.rb
View file @
f320219a
...
...
@@ -237,8 +237,7 @@ module RelativePositioning
relation
.
pluck
(
self
.
class
.
relative_positioning_parent_column
,
Arel
.
sql
(
"
#{
calculation
}
(relative_position) AS position"
))
.
first
&
.
last
.
first
&
.
last
end
def
scoped_items
...
...
app/models/concerns/resolvable_discussion.rb
View file @
f320219a
...
...
@@ -63,7 +63,7 @@ module ResolvableDiscussion
return
unless
resolved?
strong_memoize
(
:last_resolved_note
)
do
resolved_notes
.
sort_by
(
&
:resolved_at
).
last
resolved_notes
.
max_by
(
&
:resolved_at
)
end
end
...
...
app/models/uploads/base.rb
View file @
f320219a
...
...
@@ -7,7 +7,7 @@ module Uploads
attr_reader
:logger
def
initialize
(
logger:
nil
)
@logger
||
=
Rails
.
logger
# rubocop:disable Gitlab/RailsLogger
@logger
=
Rails
.
logger
# rubocop:disable Gitlab/RailsLogger
end
def
delete_keys_async
(
keys_to_delete
)
...
...
config/initializers/rspec_profiling.rb
View file @
f320219a
...
...
@@ -46,7 +46,7 @@ module RspecProfilingExt
rescue
=>
err
return
if
@already_logged_example_finished_error
# rubocop:disable Gitlab/ModuleWithInstanceVariables
$stderr
.
puts
"rspec_profiling couldn't collect an example:
#{
err
}
. Further warnings suppressed."
warn
"rspec_profiling couldn't collect an example:
#{
err
}
. Further warnings suppressed."
@already_logged_example_finished_error
=
true
# rubocop:disable Gitlab/ModuleWithInstanceVariables
end
...
...
ee/app/mailers/ci_minutes_usage_mailer.rb
View file @
f320219a
# frozen_string_literal: true
class
CiMinutesUsageMailer
<
Base
Mailer
class
CiMinutesUsageMailer
<
Application
Mailer
def
notify
(
namespace_name
,
recipients
)
@namespace_name
=
namespace_name
...
...
ee/spec/mailers/emails/service_desk_spec.rb
View file @
f320219a
...
...
@@ -15,7 +15,7 @@ describe Emails::ServiceDesk do
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:template
)
{
double
(
content:
template_content
)
}
class
ServiceEmailClass
<
Base
Mailer
class
ServiceEmailClass
<
Application
Mailer
include
GitlabRoutingHelper
include
EmailsHelper
include
Emails
::
ServiceDesk
...
...
ee/spec/models/project_spec.rb
View file @
f320219a
...
...
@@ -1282,7 +1282,7 @@ describe Project do
:epics
,
# Gold only
:service_desk
,
# Silver and up
:audit_events
,
# Bronze and up
:geo
,
# Global feature, should not be checked at namespace level
:geo
# Global feature, should not be checked at namespace level
])
end
...
...
lib/api/commit_statuses.rb
View file @
f320219a
...
...
@@ -76,14 +76,12 @@ module API
name
=
params
[
:name
]
||
params
[
:context
]
||
'default'
unless
pipeline
pipeline
=
user_project
.
ci_pipelines
.
create!
(
source: :external
,
sha:
commit
.
sha
,
ref:
ref
,
user:
current_user
,
protected:
user_project
.
protected_for?
(
ref
))
end
pipeline
||=
user_project
.
ci_pipelines
.
create!
(
source: :external
,
sha:
commit
.
sha
,
ref:
ref
,
user:
current_user
,
protected:
user_project
.
protected_for?
(
ref
))
status
=
GenericCommitStatus
.
running_or_pending
.
find_or_initialize_by
(
project:
user_project
,
...
...
lib/backup/manager.rb
View file @
f320219a
...
...
@@ -135,11 +135,11 @@ module Backup
progress
.
print
'Unpacking backup ... '
unless
Kernel
.
system
(
*
%W(tar -xf
#{
tar_file
}
)
)
if
Kernel
.
system
(
*
%W(tar -xf
#{
tar_file
}
)
)
progress
.
puts
'done'
.
color
(
:green
)
else
progress
.
puts
'unpacking backup failed'
.
color
(
:red
)
exit
1
else
progress
.
puts
'done'
.
color
(
:green
)
end
ENV
[
"VERSION"
]
=
"
#{
settings
[
:db_version
]
}
"
if
settings
[
:db_version
].
to_i
>
0
...
...
lib/gitlab/ci/ansi2html.rb
View file @
f320219a
...
...
@@ -15,7 +15,7 @@ module Gitlab
4
=>
'blue'
,
5
=>
'magenta'
,
6
=>
'cyan'
,
7
=>
'white'
,
# not that this is gray in the dark (aka default) color table
7
=>
'white'
# not that this is gray in the dark (aka default) color table
}.
freeze
STYLE_SWITCHES
=
{
...
...
lib/gitlab/cycle_analytics/usage_data.rb
View file @
f320219a
...
...
@@ -12,7 +12,7 @@ module Gitlab
@options
=
{
from:
7
.
days
.
ago
}
end
def
to_json
def
to_json
(
*
)
total
=
0
values
=
...
...
lib/gitlab/git/diff_collection.rb
View file @
f320219a
...
...
@@ -102,7 +102,7 @@ module Gitlab
def
populate!
return
if
@populated
each
{
nil
}
# force a loop through all diffs
each
{}
# force a loop through all diffs
nil
end
...
...
lib/gitlab/gpg/commit.rb
View file @
f320219a
...
...
@@ -16,13 +16,13 @@ module Gitlab
def
signature_text
strong_memoize
(
:signature_text
)
do
@signature_data
&
.
itself
&&
@signature_data
[
0
]
@signature_data
&
.
itself
&&
@signature_data
[
0
]
# rubocop:disable Lint/SafeNavigationConsistency
end
end
def
signed_text
strong_memoize
(
:signed_text
)
do
@signature_data
&
.
itself
&&
@signature_data
[
1
]
@signature_data
&
.
itself
&&
@signature_data
[
1
]
# rubocop:disable Lint/SafeNavigationConsistency
end
end
...
...
lib/gitlab/highlight.rb
View file @
f320219a
...
...
@@ -32,7 +32,7 @@ module Gitlab
@lexer
||=
custom_language
||
begin
Rouge
::
Lexer
.
guess
(
filename:
@blob_name
,
source:
@blob_content
).
new
rescue
Rouge
::
Guesser
::
Ambiguous
=>
e
e
.
alternatives
.
sort_by
(
&
:tag
).
first
e
.
alternatives
.
min_by
(
&
:tag
)
end
end
...
...
lib/gitlab/project_search_results.rb
View file @
f320219a
...
...
@@ -106,10 +106,10 @@ module Gitlab
@wiki_blobs
||=
begin
if
project
.
wiki_enabled?
&&
query
.
present?
unless
project
.
wiki
.
empty?
Gitlab
::
WikiFileFinder
.
new
(
project
,
repository_wiki_ref
).
find
(
query
)
else
if
project
.
wiki
.
empty?
[]
else
Gitlab
::
WikiFileFinder
.
new
(
project
,
repository_wiki_ref
).
find
(
query
)
end
else
[]
...
...
lib/gitlab/project_transfer.rb
View file @
f320219a
...
...
@@ -32,7 +32,7 @@ module Gitlab
private
def
move
(
path_was
,
path
,
base_dir
=
nil
)
base_dir
=
root_dir
unless
base
_dir
base_dir
||=
root
_dir
from
=
File
.
join
(
base_dir
,
path_was
)
to
=
File
.
join
(
base_dir
,
path
)
FileUtils
.
mv
(
from
,
to
)
...
...
lib/gitlab/template/base_template.rb
View file @
f320219a
...
...
@@ -33,7 +33,7 @@ module Gitlab
self
end
def
to_json
def
to_json
(
*
)
{
key:
key
,
name:
name
,
content:
content
}
end
...
...
lib/system_check/helpers.rb
View file @
f320219a
...
...
@@ -57,11 +57,7 @@ module SystemCheck
end
def
should_sanitize?
if
ENV
[
'SANITIZE'
]
==
'true'
true
else
false
end
ENV
[
'SANITIZE'
]
==
'true'
end
def
omnibus_gitlab?
...
...
lib/tasks/yarn.rake
View file @
f320219a
# frozen_string_literal: true
namespace
:yarn
do
desc
'Ensure Yarn is installed'
...
...
qa/qa.rb
View file @
f320219a
# frozen_string_literal: true
$:
<<
File
.
expand_path
(
File
.
dirname
(
__FILE__
)
)
$:
<<
File
.
expand_path
(
__dir__
)
Encoding
.
default_external
=
'UTF-8'
...
...
spec/features/admin/admin_groups_spec.rb
View file @
f320219a
...
...
@@ -134,7 +134,7 @@ describe 'Admin Groups' do
end
describe
'add user into a group'
,
:js
do
shared_
context
'adds user into a group'
do
shared_
examples
'adds user into a group'
do
it
do
visit
admin_group_path
(
group
)
...
...
spec/lib/gitlab/metrics/dashboard/processor_spec.rb
View file @
f320219a
...
...
@@ -62,7 +62,7 @@ describe Gitlab::Metrics::Dashboard::Processor do
'metric_a1'
,
# group priority 1, panel weight 1
project_business_metric
.
id
,
# group priority 0, panel weight nil (0)
project_response_metric
.
id
,
# group priority -5, panel weight nil (0)
project_system_metric
.
id
,
# group priority -10, panel weight nil (0)
project_system_metric
.
id
# group priority -10, panel weight nil (0)
]
actual_metrics_order
=
all_metrics
.
map
{
|
m
|
m
[
:id
]
||
m
[
:metric_id
]
}
...
...
spec/lib/marginalia_spec.rb
View file @
f320219a
...
...
@@ -18,7 +18,7 @@ describe 'Marginalia spec' do
end
end
class
MarginaliaTestMailer
<
Base
Mailer
class
MarginaliaTestMailer
<
Application
Mailer
def
first_user
User
.
first
end
...
...
spec/services/merge_requests/create_from_issue_service_spec.rb
View file @
f320219a
...
...
@@ -11,10 +11,8 @@ describe MergeRequests::CreateFromIssueService do
let
(
:milestone_id
)
{
create
(
:milestone
,
project:
project
).
id
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
milestone_id:
milestone_id
)
}
let
(
:custom_source_branch
)
{
'custom-source-branch'
}
subject
(
:service
)
{
described_class
.
new
(
project
,
user
,
service_params
)
}
subject
(
:service_with_custom_source_branch
)
{
described_class
.
new
(
project
,
user
,
branch_name:
custom_source_branch
,
**
service_params
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
service_params
)
}
let
(
:service_with_custom_source_branch
)
{
described_class
.
new
(
project
,
user
,
branch_name:
custom_source_branch
,
**
service_params
)
}
before
do
project
.
add_developer
(
user
)
...
...
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