diff options
Diffstat (limited to 'spec/models/import_spec.rb')
| -rw-r--r-- | spec/models/import_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb index 88d339ea0..53513eb0c 100644 --- a/spec/models/import_spec.rb +++ b/spec/models/import_spec.rb @@ -9,4 +9,18 @@ RSpec.describe Import, :type => :model do it { should validate_presence_of(:file) } it { should validate_presence_of(:referential) } it { should validate_presence_of(:workbench) } + + describe "#notify_parent" do + it "must call #child_change on its parent" do + workbench_import = build_stubbed(:workbench_import) + netex_import = build_stubbed( + :netex_import, + parent: workbench_import + ) + + expect(workbench_import).to receive(:child_change).with(netex_import) + + netex_import.notify_parent + end + end end |
