diff options
| author | Edouard Maffert | 2016-07-28 15:05:14 +0200 |
|---|---|---|
| committer | Edouard Maffert | 2016-07-28 15:05:36 +0200 |
| commit | c73fc634eee6e306594df37f7ec21be7a6366dbd (patch) | |
| tree | d103ab375c2b2e1c9cc44c7a6295f09d12797ef0 /spec | |
| parent | 6dc3c7a58d5c0fc0beb8a428616dce52e2361305 (diff) | |
| download | chouette-core-c73fc634eee6e306594df37f7ec21be7a6366dbd.tar.bz2 | |
fix tests
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/factories/chouette_companies.rb | 4 | ||||
| -rw-r--r-- | spec/factories/chouette_lines.rb | 2 | ||||
| -rw-r--r-- | spec/features/companies_spec.rb | 2 | ||||
| -rw-r--r-- | spec/features/lines_spec.rb | 2 | ||||
| -rw-r--r-- | spec/models/chouette/line_spec.rb | 2 |
5 files changed, 7 insertions, 5 deletions
diff --git a/spec/factories/chouette_companies.rb b/spec/factories/chouette_companies.rb index c0e46fe42..35ce34257 100644 --- a/spec/factories/chouette_companies.rb +++ b/spec/factories/chouette_companies.rb @@ -2,8 +2,10 @@ FactoryGirl.define do factory :company, :class => Chouette::Company do sequence(:name) { |n| "Company #{n}" } - sequence(:objectid) { |n| "test:Company:#{n}" } + sequence(:objectid) { |n| "chouette:test:Company:#{n}" } sequence(:registration_number) { |n| "test-#{n}" } + + association :line_referential, :factory => :line_referential end end diff --git a/spec/factories/chouette_lines.rb b/spec/factories/chouette_lines.rb index 0a720da48..da79f8c98 100644 --- a/spec/factories/chouette_lines.rb +++ b/spec/factories/chouette_lines.rb @@ -2,7 +2,7 @@ FactoryGirl.define do factory :line, :class => Chouette::Line do sequence(:name) { |n| "Line #{n}" } - sequence(:objectid) { |n| "test:Line:#{n}" } + sequence(:objectid) { |n| "chouette:test:Line:#{n}" } sequence(:transport_mode_name) { |n| "Bus" } association :network, :factory => :network diff --git a/spec/features/companies_spec.rb b/spec/features/companies_spec.rb index 3628d04f0..c85f6f2cd 100644 --- a/spec/features/companies_spec.rb +++ b/spec/features/companies_spec.rb @@ -31,7 +31,7 @@ describe "Companies", :type => :feature do click_link "Ajouter un transporteur" fill_in "company_name", :with => "Company 1" fill_in "Numéro d'enregistrement", :with => "test-1" - fill_in "Identifiant Neptune", :with => "test:Company:1" + fill_in "Identifiant Neptune", :with => "chouette:test:Company:1" click_button("Créer transporteur") expect(page).to have_content("Company 1") end diff --git a/spec/features/lines_spec.rb b/spec/features/lines_spec.rb index 91185c22e..67303e05b 100644 --- a/spec/features/lines_spec.rb +++ b/spec/features/lines_spec.rb @@ -41,7 +41,7 @@ describe "Lines", :type => :feature do click_link "Ajouter une ligne" fill_in "line_name", :with => "Line 1" fill_in "Numéro d'enregistrement", :with => "1" - fill_in "Identifiant Neptune", :with => "test:Line:999" + fill_in "Identifiant Neptune", :with => "chouette:test:Line:999" click_button("Créer ligne") expect(page).to have_content("Line 1") end diff --git a/spec/models/chouette/line_spec.rb b/spec/models/chouette/line_spec.rb index 2394db85a..4b22a911d 100644 --- a/spec/models/chouette/line_spec.rb +++ b/spec/models/chouette/line_spec.rb @@ -15,7 +15,7 @@ describe Chouette::Line, :type => :model do describe '#objectid' do subject { super().objectid } - it { is_expected.to be_kind_of(Chouette::ObjectId) } + it { is_expected.to be_kind_of(Chouette::NetexObjectId) } end # it { should validate_numericality_of :objectversion } |
