diff options
| author | Teddy Wing | 2017-08-28 18:35:58 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-08-28 18:38:39 +0200 |
| commit | 1fe97b3bb1429916f7dde8e90dde49197135398b (patch) | |
| tree | 6cf6c5fe7549ba6eaa409547059ab5c8d513401b /spec | |
| parent | e38390a4c1fb87041db0e699c70c9a15cad02bb8 (diff) | |
| download | chouette-core-1fe97b3bb1429916f7dde8e90dde49197135398b.tar.bz2 | |
Import spec: Ensure `#update_` methods are called on `#child_change`
Some quick tests for the recent changes to `#child_change`, to ensure
that `#update_status` and `#update_referential` are called by the
method.
Diffstat (limited to 'spec')
| -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 76f945871..3300392b7 100644 --- a/spec/models/import_spec.rb +++ b/spec/models/import_spec.rb @@ -132,6 +132,20 @@ RSpec.describe Import, :type => :model do "doesn't update :status if parent import status is finished", "canceled" ) + + it "calls #update_status" do + allow(workbench_import).to receive(:update) + + expect(workbench_import).to receive(:update_status) + workbench_import.child_change + end + + it "calls #update_referential" do + allow(workbench_import).to receive(:update) + + expect(workbench_import).to receive(:update_referential) + workbench_import.child_change + end end describe "#ready?" do |
