|
|
|
@ -5,17 +5,15 @@ RSpec.describe BulkUpload, type: :model do |
|
|
|
|
|
|
|
|
|
|
|
describe "def bulk_upload.completed?" do |
|
|
|
describe "def bulk_upload.completed?" do |
|
|
|
context "when there are incomplete logs" do |
|
|
|
context "when there are incomplete logs" do |
|
|
|
let!(:lettings_log) { create_list(:lettings_log, 2, :in_progress, bulk_upload:) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "returns false" do |
|
|
|
it "returns false" do |
|
|
|
|
|
|
|
create_list(:lettings_log, 2, :in_progress, bulk_upload:) |
|
|
|
expect(bulk_upload.completed?).to equal(false) |
|
|
|
expect(bulk_upload.completed?).to equal(false) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when there are no incomplete logs" do |
|
|
|
context "when there are no incomplete logs" do |
|
|
|
let!(:lettings_log) { create_list(:lettings_log, 2, :completed, bulk_upload:) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "returns true" do |
|
|
|
it "returns true" do |
|
|
|
|
|
|
|
create_list(:lettings_log, 2, :completed, bulk_upload:) |
|
|
|
expect(bulk_upload.completed?).to equal(true) |
|
|
|
expect(bulk_upload.completed?).to equal(true) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|