aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/referential.rb
diff options
context:
space:
mode:
authorAlban Peignier2016-05-15 09:22:06 +0200
committerAlban Peignier2016-05-15 09:22:06 +0200
commitaffbacfcd955230f66badb261dcc462cca9cd0b9 (patch)
tree5410864baa11d3e5b24671cfb8f9258aaa833e62 /spec/support/referential.rb
parentf5a3f0061fed4f8f51ebc0d556539a483626f76e (diff)
downloadchouette-core-affbacfcd955230f66badb261dcc462cca9cd0b9.tar.bz2
Associate LineReferential to Referential. Create ReferentialLines to manage lines in Referential. Refs #826
Diffstat (limited to 'spec/support/referential.rb')
-rw-r--r--spec/support/referential.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/support/referential.rb b/spec/support/referential.rb
index 8c468eb53..ddad29963 100644
--- a/spec/support/referential.rb
+++ b/spec/support/referential.rb
@@ -39,7 +39,12 @@ RSpec.configure do |config|
Apartment::Tenant.drop('first') rescue nil
# Create the default tenant for our tests
organisation = Organisation.create!(:name => "first")
- Referential.create!(:prefix => "first", :name => "first", :slug => "first", :organisation => organisation)
+
+ line_referential = LineReferential.find_or_create_by(name: "first") do |referential|
+ referential.add_member organisation, owner: true
+ end
+
+ Referential.create! prefix: "first", name: "first", slug: "first", organisation: organisation, line_referential: line_referential
end
config.before(:each) do