aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorXinhui2018-01-16 15:02:13 +0100
committerXinhui2018-01-16 15:02:13 +0100
commit1ccde4934474a67d31261e3abbe5eacdbc04d834 (patch)
tree7d3cbbb9f3a5c6d6918191968effcd0ec960aa38 /spec
parentb1c55750bb43736c2cb6f9619bddc453cfadb1aa (diff)
downloadchouette-core-5609_referential_slug.tar.bz2
Edit referential slug validation format5609_referential_slug
Refs #5609
Diffstat (limited to 'spec')
-rw-r--r--spec/models/referential_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/referential_spec.rb b/spec/models/referential_spec.rb
index 6d699f759..5758d8235 100644
--- a/spec/models/referential_spec.rb
+++ b/spec/models/referential_spec.rb
@@ -9,6 +9,16 @@ describe Referential, :type => :model do
subject { build_stubbed(:referential) }
it { should validate_presence_of(:objectid_format) }
+
+ it 'should authorize slug with nummerical value' do
+ subject.slug = '2018-hiver-jezequel-mm-lyon-nice'
+ expect(subject).to be_valid
+ end
+
+ it 'should authorize slug with accents' do
+ subject.slug = 'écolê-été-hiver-lyon-nice'
+ expect(subject).to be_valid
+ end
end
context ".referential_ids_in_periode" do