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
0e6ef209
Commit
0e6ef209
authored
Apr 30, 2019
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid copy paste problems
parent
19ade869
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
ee/app/models/geo_node.rb
ee/app/models/geo_node.rb
+3
-0
ee/spec/models/geo_node_spec.rb
ee/spec/models/geo_node_spec.rb
+12
-0
No files found.
ee/app/models/geo_node.rb
View file @
0e6ef209
...
...
@@ -3,6 +3,7 @@
class
GeoNode
<
ApplicationRecord
include
Presentable
include
Geo
::
SelectiveSync
include
StripAttribute
SELECTIVE_SYNC_TYPES
=
%w[namespaces shards]
.
freeze
...
...
@@ -55,6 +56,8 @@ class GeoNode < ApplicationRecord
mode: :per_attribute_iv
,
encode:
true
strip_attributes
:name
class
<<
self
# Set in gitlab.rb as external_url
def
current_node_url
...
...
ee/spec/models/geo_node_spec.rb
View file @
0e6ef209
...
...
@@ -671,4 +671,16 @@ describe GeoNode, :geo, type: :model do
is_expected
.
to
be_falsy
end
end
describe
'#name='
do
context
'before validation'
do
it
'strips leading and trailing whitespace'
do
node
=
build
(
:geo_node
)
node
.
name
=
" foo
\n\n
"
node
.
valid?
expect
(
node
.
name
).
to
eq
(
'foo'
)
end
end
end
end
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