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
b85ce5f9
Commit
b85ce5f9
authored
Apr 09, 2021
by
Huzaifa Iftikhar
Committed by
Alex Kalderimis
Apr 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EmptyLineAfterFinalLetItBe offenses in spec/models/project
parent
125a909a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
5 deletions
+27
-5
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-5
changelogs/unreleased/issue-325836-fix-empty-line-after-let-it-be-models-project.yml
...-325836-fix-empty-line-after-let-it-be-models-project.yml
+5
-0
spec/models/project_services/chat_message/alert_message_spec.rb
...odels/project_services/chat_message/alert_message_spec.rb
+1
-0
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+1
-0
spec/models/project_services/prometheus_service_spec.rb
spec/models/project_services/prometheus_service_spec.rb
+2
-0
spec/models/project_services/slack_service_spec.rb
spec/models/project_services/slack_service_spec.rb
+8
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+10
-0
No files found.
.rubocop_manual_todo.yml
View file @
b85ce5f9
...
...
@@ -1176,11 +1176,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
-
spec/models/packages/package_spec.rb
-
spec/models/packages/tag_spec.rb
-
spec/models/plan_limits_spec.rb
-
spec/models/project_services/chat_message/alert_message_spec.rb
-
spec/models/project_services/jira_service_spec.rb
-
spec/models/project_services/prometheus_service_spec.rb
-
spec/models/project_services/slack_service_spec.rb
-
spec/models/project_spec.rb
-
spec/models/prometheus_alert_spec.rb
-
spec/models/protected_branch/push_access_level_spec.rb
-
spec/models/release_spec.rb
...
...
changelogs/unreleased/issue-325836-fix-empty-line-after-let-it-be-models-project.yml
0 → 100644
View file @
b85ce5f9
---
title
:
Fix EmptyLineAfterFinalLetItBe offenses in spec/models/project
merge_request
:
58372
author
:
Huzaifa Iftikhar @huzaifaiftikhar
type
:
fixed
spec/models/project_services/chat_message/alert_message_spec.rb
View file @
b85ce5f9
...
...
@@ -6,6 +6,7 @@ RSpec.describe ChatMessage::AlertMessage do
subject
{
described_class
.
new
(
args
)
}
let_it_be
(
:start_time
)
{
Time
.
current
}
let
(
:alert
)
{
create
(
:alert_management_alert
,
started_at:
start_time
)
}
let
(
:args
)
do
...
...
spec/models/project_services/jira_service_spec.rb
View file @
b85ce5f9
...
...
@@ -790,6 +790,7 @@ RSpec.describe JiraService do
describe
'#create_cross_reference_note'
do
let_it_be
(
:user
)
{
build_stubbed
(
:user
)
}
let
(
:jira_issue
)
{
ExternalIssue
.
new
(
'JIRA-123'
,
project
)
}
subject
{
jira_service
.
create_cross_reference_note
(
jira_issue
,
resource
,
user
)
}
...
...
spec/models/project_services/prometheus_service_spec.rb
View file @
b85ce5f9
...
...
@@ -9,6 +9,7 @@ RSpec.describe PrometheusService, :use_clean_rails_memory_store_caching, :snowpl
include
ReactiveCachingHelpers
let_it_be_with_reload
(
:project
)
{
create
(
:prometheus_project
)
}
let
(
:service
)
{
project
.
prometheus_service
}
describe
"Associations"
do
...
...
@@ -337,6 +338,7 @@ RSpec.describe PrometheusService, :use_clean_rails_memory_store_caching, :snowpl
context
'cluster belongs to projects group'
do
let_it_be
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:prometheus_project
,
group:
group
)
}
let
(
:cluster
)
{
create
(
:cluster_for_group
,
:with_installed_helm
,
groups:
[
group
])
}
...
...
spec/models/project_services/slack_service_spec.rb
View file @
b85ce5f9
...
...
@@ -32,6 +32,7 @@ RSpec.describe SlackService do
context
'event is not supported for usage log'
do
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
let
(
:data
)
{
Gitlab
::
DataBuilder
::
Pipeline
.
build
(
pipeline
)
}
it
'does not increase the usage data counter'
do
...
...
@@ -43,6 +44,7 @@ RSpec.describe SlackService do
context
'issue notification'
do
let_it_be
(
:issue
)
{
create
(
:issue
)
}
let
(
:data
)
{
issue
.
to_hook_data
(
user
)
}
it_behaves_like
'increases the usage data counter'
,
'i_ecosystem_slack_service_issue_notification'
...
...
@@ -56,6 +58,7 @@ RSpec.describe SlackService do
context
'deployment notification'
do
let_it_be
(
:deployment
)
{
create
(
:deployment
,
user:
user
)
}
let
(
:data
)
{
Gitlab
::
DataBuilder
::
Deployment
.
build
(
deployment
)
}
it_behaves_like
'increases the usage data counter'
,
'i_ecosystem_slack_service_deployment_notification'
...
...
@@ -63,6 +66,7 @@ RSpec.describe SlackService do
context
'wiki_page notification'
do
let_it_be
(
:wiki_page
)
{
create
(
:wiki_page
,
wiki:
project
.
wiki
,
message:
'user created page: Awesome wiki_page'
)
}
let
(
:data
)
{
Gitlab
::
DataBuilder
::
WikiPage
.
build
(
wiki_page
,
user
,
'create'
)
}
it_behaves_like
'increases the usage data counter'
,
'i_ecosystem_slack_service_wiki_page_notification'
...
...
@@ -70,6 +74,7 @@ RSpec.describe SlackService do
context
'merge_request notification'
do
let_it_be
(
:merge_request
)
{
create
(
:merge_request
)
}
let
(
:data
)
{
merge_request
.
to_hook_data
(
user
)
}
it_behaves_like
'increases the usage data counter'
,
'i_ecosystem_slack_service_merge_request_notification'
...
...
@@ -77,6 +82,7 @@ RSpec.describe SlackService do
context
'note notification'
do
let_it_be
(
:issue_note
)
{
create
(
:note_on_issue
,
note:
'issue note'
)
}
let
(
:data
)
{
Gitlab
::
DataBuilder
::
Note
.
build
(
issue_note
,
user
)
}
it_behaves_like
'increases the usage data counter'
,
'i_ecosystem_slack_service_note_notification'
...
...
@@ -93,6 +99,7 @@ RSpec.describe SlackService do
context
'confidential note notification'
do
let_it_be
(
:confidential_issue_note
)
{
create
(
:note_on_issue
,
note:
'issue note'
,
confidential:
true
)
}
let
(
:data
)
{
Gitlab
::
DataBuilder
::
Note
.
build
(
confidential_issue_note
,
user
)
}
it_behaves_like
'increases the usage data counter'
,
'i_ecosystem_slack_service_confidential_note_notification'
...
...
@@ -100,6 +107,7 @@ RSpec.describe SlackService do
context
'confidential issue notification'
do
let_it_be
(
:issue
)
{
create
(
:issue
,
confidential:
true
)
}
let
(
:data
)
{
issue
.
to_hook_data
(
user
)
}
it_behaves_like
'increases the usage data counter'
,
'i_ecosystem_slack_service_confidential_issue_notification'
...
...
spec/models/project_spec.rb
View file @
b85ce5f9
...
...
@@ -891,6 +891,7 @@ RSpec.describe Project, factory_default: :keep do
describe
'#get_issue'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
before_all
do
...
...
@@ -2406,6 +2407,7 @@ RSpec.describe Project, factory_default: :keep do
describe
'#latest_pipeline'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:second_branch
)
{
project
.
repository
.
branches
[
2
]
}
let!
(
:pipeline_for_default_branch
)
do
...
...
@@ -2870,6 +2872,7 @@ RSpec.describe Project, factory_default: :keep do
describe
'#emails_disabled?'
do
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let
(
:project
)
{
build
(
:project
,
namespace:
namespace
,
emails_disabled:
false
)
}
context
'emails disabled in group'
do
...
...
@@ -3190,6 +3193,7 @@ RSpec.describe Project, factory_default: :keep do
describe
'#ci_variables_for'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:environment_scope
)
{
'*'
}
let!
(
:ci_variable
)
do
...
...
@@ -4035,6 +4039,7 @@ RSpec.describe Project, factory_default: :keep do
include
ProjectHelpers
let_it_be
(
:group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
project_level
,
namespace:
group
)
}
let
(
:user
)
{
create_user_from_membership
(
project
,
membership
)
}
...
...
@@ -4300,6 +4305,7 @@ RSpec.describe Project, factory_default: :keep do
context
'legacy storage'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
:legacy_storage
)
}
let
(
:gitlab_shell
)
{
Gitlab
::
Shell
.
new
}
let
(
:project_storage
)
{
project
.
send
(
:storage
)
}
...
...
@@ -4399,6 +4405,7 @@ RSpec.describe Project, factory_default: :keep do
context
'hashed storage'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
skip_disk_validation:
true
)
}
let
(
:gitlab_shell
)
{
Gitlab
::
Shell
.
new
}
let
(
:hash
)
{
Digest
::
SHA2
.
hexdigest
(
project
.
id
.
to_s
)
}
let
(
:hashed_prefix
)
{
File
.
join
(
'@hashed'
,
hash
[
0
..
1
],
hash
[
2
..
3
])
}
...
...
@@ -4489,6 +4496,7 @@ RSpec.describe Project, factory_default: :keep do
describe
'#has_ci?'
do
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
)
}
let
(
:repository
)
{
double
}
before
do
...
...
@@ -4985,6 +4993,7 @@ RSpec.describe Project, factory_default: :keep do
context
'branch protection'
do
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
namespace
)
}
before
do
...
...
@@ -6597,6 +6606,7 @@ RSpec.describe Project, factory_default: :keep do
describe
'#latest_jira_import'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
context
'when no jira imports'
do
it
'returns nil'
do
expect
(
project
.
latest_jira_import
).
to
be
nil
...
...
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