Commit b113016a4eb31e7b8c85dfd507bc0a38a5986362
Committed by
Joenio Costa
1 parent
251e6e43
Exists in
web_steps_improvements
and in
6 other branches
Add "*" to identifier format
signed-off-by: Joenio Costa <joenio@colivre.coop.br>
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
lib/noosfero.rb
@@ -67,7 +67,7 @@ module Noosfero | @@ -67,7 +67,7 @@ module Noosfero | ||
67 | end | 67 | end |
68 | 68 | ||
69 | def self.identifier_format | 69 | def self.identifier_format |
70 | - '[a-z0-9][a-z0-9~.]*([_\-][a-z0-9~.]+)*' | 70 | + '[a-z0-9][a-z0-9~.*]*([_\-][a-z0-9~.*]+)*' |
71 | end | 71 | end |
72 | 72 | ||
73 | # All valid identifiers, plus ~ meaning "the current user". See | 73 | # All valid identifiers, plus ~ meaning "the current user". See |
test/unit/noosfero_test.rb
@@ -28,6 +28,7 @@ class NoosferoTest < ActiveSupport::TestCase | @@ -28,6 +28,7 @@ class NoosferoTest < ActiveSupport::TestCase | ||
28 | assert_match /^#{Noosfero.identifier_format}$/, 'bli-bla' | 28 | assert_match /^#{Noosfero.identifier_format}$/, 'bli-bla' |
29 | assert_no_match /^#{Noosfero.identifier_format}$/, 'UPPER' | 29 | assert_no_match /^#{Noosfero.identifier_format}$/, 'UPPER' |
30 | assert_match /^#{Noosfero.identifier_format}$/, 'with~tilde' | 30 | assert_match /^#{Noosfero.identifier_format}$/, 'with~tilde' |
31 | + assert_match /^#{Noosfero.identifier_format}$/, 'with*asterisk' | ||
31 | assert_match /^#{Noosfero.identifier_format}$/, 'with.dot' | 32 | assert_match /^#{Noosfero.identifier_format}$/, 'with.dot' |
32 | end | 33 | end |
33 | 34 |