diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/factories/chouette_2_factories.rb | 1 | ||||
| -rw-r--r-- | spec/models/user_spec.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/spec/factories/chouette_2_factories.rb b/spec/factories/chouette_2_factories.rb index 6234f6540..b88b0d773 100644 --- a/spec/factories/chouette_2_factories.rb +++ b/spec/factories/chouette_2_factories.rb @@ -2,6 +2,7 @@ FactoryGirl.define do factory :organisation do sequence(:name) { |n| "Organisation #{n}" } + sequence(:code) { |n| "000#{n}" } end factory :referential do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index ea1170aa1..9c9efce4b 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -32,7 +32,7 @@ describe User, :type => :model do it 'should not create a new organisation if organisation is already present' do organisation = create :organisation - ticket.extra_attributes[:organisation_name] = organisation.name + ticket.extra_attributes[:organisation_code] = organisation.code expect{User.authenticate_with_cas_ticket(ticket)}.not_to change{ Organisation.count } end end |
