diff options
Diffstat (limited to 'spec/factories/chouette_lines.rb')
| -rw-r--r-- | spec/factories/chouette_lines.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/factories/chouette_lines.rb b/spec/factories/chouette_lines.rb index 423ab99f2..95f760174 100644 --- a/spec/factories/chouette_lines.rb +++ b/spec/factories/chouette_lines.rb @@ -8,7 +8,7 @@ FactoryGirl.define do association :network, :factory => :network association :company, :factory => :company - + before(:create) do |line| line.line_referential ||= LineReferential.find_by! name: "first" end @@ -44,6 +44,11 @@ FactoryGirl.define do end + factory :line_with_after_commit do |line| + line.run_callbacks(:commit) + + end + end end |
