aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/models/chouette/objectid/netex_spec.rb10
-rw-r--r--spec/models/chouette/objectid/stif_codifligne_spec.rb10
-rw-r--r--spec/models/chouette/objectid/stif_netex_spec.rb10
-rw-r--r--spec/models/chouette/objectid/stif_reflex_spec.rb11
4 files changed, 41 insertions, 0 deletions
diff --git a/spec/models/chouette/objectid/netex_spec.rb b/spec/models/chouette/objectid/netex_spec.rb
new file mode 100644
index 000000000..3aee13624
--- /dev/null
+++ b/spec/models/chouette/objectid/netex_spec.rb
@@ -0,0 +1,10 @@
+require 'spec_helper'
+
+describe Chouette::Objectid::Netex, :type => :model do
+ subject { Chouette::Objectid::Netex.new(object_type: 'Route', local_id: SecureRandom.uuid) }
+ it { should validate_presence_of :provider_id }
+ it { should validate_presence_of :object_type }
+ it { should validate_presence_of :local_id }
+ it { should validate_presence_of :creation_id }
+ it { is_expected.to be_valid }
+end \ No newline at end of file
diff --git a/spec/models/chouette/objectid/stif_codifligne_spec.rb b/spec/models/chouette/objectid/stif_codifligne_spec.rb
new file mode 100644
index 000000000..533af3556
--- /dev/null
+++ b/spec/models/chouette/objectid/stif_codifligne_spec.rb
@@ -0,0 +1,10 @@
+require 'spec_helper'
+
+describe Chouette::Objectid::StifCodifligne, :type => :model do
+ subject { Chouette::Objectid::StifCodifligne.new(object_type: 'Line', local_id: 'C02008', sync_id: 'CODIFLIGNE', provider_id: 'STIF') }
+ it { should validate_presence_of :provider_id }
+ it { should validate_presence_of :object_type }
+ it { should validate_presence_of :local_id }
+ it { should validate_presence_of :sync_id }
+ it { is_expected.to be_valid }
+end \ No newline at end of file
diff --git a/spec/models/chouette/objectid/stif_netex_spec.rb b/spec/models/chouette/objectid/stif_netex_spec.rb
new file mode 100644
index 000000000..1d361ca86
--- /dev/null
+++ b/spec/models/chouette/objectid/stif_netex_spec.rb
@@ -0,0 +1,10 @@
+require 'spec_helper'
+
+describe Chouette::Objectid::StifNetex, :type => :model do
+ subject { Chouette::Objectid::StifNetex.new(object_type: 'Route', local_id: '13') }
+ it { should validate_presence_of :provider_id }
+ it { should validate_presence_of :object_type }
+ it { should validate_presence_of :local_id }
+ it { should validate_presence_of :creation_id }
+ it { is_expected.to be_valid }
+end \ No newline at end of file
diff --git a/spec/models/chouette/objectid/stif_reflex_spec.rb b/spec/models/chouette/objectid/stif_reflex_spec.rb
new file mode 100644
index 000000000..0846f27fa
--- /dev/null
+++ b/spec/models/chouette/objectid/stif_reflex_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe Chouette::Objectid::StifReflex, :type => :model do
+ subject { Chouette::Objectid::StifReflex.new(country_code: 'FR', zip_code: '78517', object_type: 'ZDL', local_id: '50015386', provider_id: 'STIF') }
+ it { should validate_presence_of :provider_id }
+ it { should validate_presence_of :object_type }
+ it { should validate_presence_of :local_id }
+ it { should validate_presence_of :country_code }
+ it { should validate_presence_of :zip_code }
+ it { is_expected.to be_valid }
+end \ No newline at end of file