diff options
Diffstat (limited to 'spec/models/import_spec.rb')
| -rw-r--r-- | spec/models/import_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb index 53513eb0c..1b8fe72c2 100644 --- a/spec/models/import_spec.rb +++ b/spec/models/import_spec.rb @@ -23,4 +23,26 @@ RSpec.describe Import, :type => :model do netex_import.notify_parent end end + + describe "#ready?" do + it "returns true if #current_step == #total_steps" do + import = build_stubbed( + :import, + total_steps: 4, + current_step: 4 + ) + + expect(import.ready?).to be true + end + + it "returns false if #current_step != #total_steps" do + import = build_stubbed( + :import, + total_steps: 6, + current_step: 3 + ) + + expect(import.ready?).to be false + end + end end |
