diff options
| author | Xinhui | 2018-01-16 15:02:13 +0100 |
|---|---|---|
| committer | Xinhui | 2018-01-16 15:02:13 +0100 |
| commit | 1ccde4934474a67d31261e3abbe5eacdbc04d834 (patch) | |
| tree | 7d3cbbb9f3a5c6d6918191968effcd0ec960aa38 /spec | |
| parent | b1c55750bb43736c2cb6f9619bddc453cfadb1aa (diff) | |
| download | chouette-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.rb | 10 |
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 |
