aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/import_spec.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-08-29 13:19:39 +0200
committerTeddy Wing2017-08-29 13:23:25 +0200
commit51198602a7799af366d5d26f3d6fc397a37d13dc (patch)
treecbc59b027feda19647ab0183854096c633880e9a /spec/models/import_spec.rb
parentf9d176ebccd7eebb505154ce84252bc055cfedc9 (diff)
downloadchouette-core-51198602a7799af366d5d26f3d6fc397a37d13dc.tar.bz2
Import#update_status: Update `ended_at` when import has finished status
Previously we were only updating the `ended_at` field when the import had a 'successful' status. But there are other statuses that indicate the import finished, and the `ended_at` field should be updated in these cases also. Committing what I have now which seems to work but I didn't write specs for it because it was a pain to test (what with creating a child, etc.). The `#update_status` method should be refactored to make testing the `ended_at` update easier. This needs to be committed without specs now because I'm off to go to a client meeting and this work/branch is blocking QA of imports both internally and externally. So I guess doing things right comes later. That is to say, probably a lot later. Who knows.
Diffstat (limited to 'spec/models/import_spec.rb')
-rw-r--r--spec/models/import_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb
index 6d3d23830..54bd59e3e 100644
--- a/spec/models/import_spec.rb
+++ b/spec/models/import_spec.rb
@@ -152,5 +152,11 @@ RSpec.describe Import, :type => :model do
end
end
+ describe "#update_status" do
+ it "updates :ended_at to now when status is finished" do
+ pending "Redo the `#update_status` code to make it easier to write this."
+ end
+ end
+
# TODO: specs for #update_referential
end