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
3a252c32
Commit
3a252c32
authored
May 17, 2021
by
Suraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed new rubocop errors introduced during fixing
parent
e1373d8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
spec/models/application_record_spec.rb
spec/models/application_record_spec.rb
+1
-0
spec/models/application_setting_spec.rb
spec/models/application_setting_spec.rb
+8
-8
No files found.
spec/models/application_record_spec.rb
View file @
3a252c32
...
...
@@ -14,6 +14,7 @@ RSpec.describe ApplicationRecord do
describe
'.safe_ensure_unique'
do
let
(
:model
)
{
build
(
:suggestion
)
}
let_it_be
(
:note
)
{
create
(
:diff_note_on_merge_request
)
}
let
(
:klass
)
{
model
.
class
}
before
do
...
...
spec/models/application_setting_spec.rb
View file @
3a252c32
...
...
@@ -252,9 +252,9 @@ RSpec.describe ApplicationSetting do
context
"when user accepted let's encrypt terms of service"
do
before
do
expect
{
expect
do
setting
.
update!
(
lets_encrypt_terms_of_service_accepted:
true
)
}
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Lets encrypt notification email can't be blank"
)
end
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Lets encrypt notification email can't be blank"
)
end
it
{
is_expected
.
not_to
allow_value
(
nil
).
for
(
:lets_encrypt_notification_email
)
}
...
...
@@ -304,17 +304,17 @@ RSpec.describe ApplicationSetting do
describe
'default_artifacts_expire_in'
do
it
'sets an error if it cannot parse'
do
expect
{
expect
do
setting
.
update!
(
default_artifacts_expire_in:
'a'
)
}
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Default artifacts expire in is not a correct duration"
)
end
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Default artifacts expire in is not a correct duration"
)
expect_invalid
end
it
'sets an error if it is blank'
do
expect
{
expect
do
setting
.
update!
(
default_artifacts_expire_in:
' '
)
}
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Default artifacts expire in can't be blank"
)
end
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Default artifacts expire in can't be blank"
)
expect_invalid
end
...
...
@@ -427,9 +427,9 @@ RSpec.describe ApplicationSetting do
context
'with an invalid value'
do
before
do
expect
{
expect
do
setting
.
update!
(
auto_devops_domain:
'definitelynotahostname'
)
}
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Auto devops domain is not a fully qualified domain name"
)
end
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
"Validation failed: Auto devops domain is not a fully qualified domain name"
)
end
it
'is invalid'
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