diff options
| author | cedricnjanga | 2018-02-14 06:26:04 -0800 |
|---|---|---|
| committer | GitHub | 2018-02-14 06:26:04 -0800 |
| commit | 3916476c64dc690195a1273dab7188bb48f69152 (patch) | |
| tree | 4b0c02015b4e41ffb8bad34d3694266eae25ca20 /spec/services | |
| parent | 2b37ca3b2f57d4c8cb00e18ce39371e7aefc1db3 (diff) | |
| parent | 385a9e1b68f3eea51f71386a8f4856477ba6a273 (diff) | |
| download | chouette-core-3562_ccset_affectation.tar.bz2 | |
Merge branch 'master' into 3562_ccset_affectation3562_ccset_affectation
Diffstat (limited to 'spec/services')
| -rw-r--r-- | spec/services/parent_notifier_spec.rb (renamed from spec/services/parent_import_notifier_spec.rb) | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/services/parent_import_notifier_spec.rb b/spec/services/parent_notifier_spec.rb index 3ab505f88..ecf508fcd 100644 --- a/spec/services/parent_import_notifier_spec.rb +++ b/spec/services/parent_notifier_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe ParentImportNotifier do +RSpec.describe ParentNotifier do let(:workbench_import) { create(:workbench_import) } describe ".notify_when_finished" do @@ -20,7 +20,7 @@ RSpec.describe ParentImportNotifier do expect(netex_import).to receive(:notify_parent) end - ParentImportNotifier.notify_when_finished(netex_imports) + ParentNotifier.new(Import).notify_when_finished(netex_imports) end it "doesn't call #notify_parent if its `notified_parent_at` is set" do @@ -33,11 +33,11 @@ RSpec.describe ParentImportNotifier do expect(netex_import).not_to receive(:notify_parent) - ParentImportNotifier.notify_when_finished + ParentNotifier.new(Import).notify_when_finished end end - describe ".imports_pending_notification" do + describe ".objects_pending_notification" do it "includes imports with a parent and `notified_parent_at` unset" do netex_import = create( :netex_import, @@ -47,7 +47,7 @@ RSpec.describe ParentImportNotifier do ) expect( - ParentImportNotifier.imports_pending_notification + ParentNotifier.new(Import).objects_pending_notification ).to eq([netex_import]) end @@ -55,7 +55,7 @@ RSpec.describe ParentImportNotifier do create(:import, parent: nil) expect( - ParentImportNotifier.imports_pending_notification + ParentNotifier.new(Import).objects_pending_notification ).to be_empty end @@ -70,7 +70,7 @@ RSpec.describe ParentImportNotifier do end expect( - ParentImportNotifier.imports_pending_notification + ParentNotifier.new(Import).objects_pending_notification ).to be_empty end @@ -83,7 +83,7 @@ RSpec.describe ParentImportNotifier do ) expect( - ParentImportNotifier.imports_pending_notification + ParentNotifier.new(Import).objects_pending_notification ).to be_empty end end |
