|
|
@ -1346,6 +1346,7 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "#mrcdate" do |
|
|
|
describe "#mrcdate" do |
|
|
|
|
|
|
|
context "when valid" do |
|
|
|
let(:attributes) { { bulk_upload:, field_92: "13", field_93: "12", field_94: "22" } } |
|
|
|
let(:attributes) { { bulk_upload:, field_92: "13", field_93: "12", field_94: "22" } } |
|
|
|
|
|
|
|
|
|
|
|
it "sets value given" do |
|
|
|
it "sets value given" do |
|
|
@ -1353,6 +1354,15 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when invalid" do |
|
|
|
|
|
|
|
let(:attributes) { { bulk_upload:, field_92: "13", field_93: "13", field_94: "22" } } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not raise an error" do |
|
|
|
|
|
|
|
expect { parser.log.mrcdate }.not_to raise_error |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "#majorrepairs" do |
|
|
|
describe "#majorrepairs" do |
|
|
|
context "when mrcdate given" do |
|
|
|
context "when mrcdate given" do |
|
|
|
let(:attributes) { { bulk_upload:, field_92: "13", field_93: "12", field_94: "22" } } |
|
|
|
let(:attributes) { { bulk_upload:, field_92: "13", field_93: "12", field_94: "22" } } |
|
|
@ -1372,6 +1382,7 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "#voiddate" do |
|
|
|
describe "#voiddate" do |
|
|
|
|
|
|
|
context "when valid" do |
|
|
|
let(:attributes) { { bulk_upload:, field_89: "13", field_90: "12", field_91: "22" } } |
|
|
|
let(:attributes) { { bulk_upload:, field_89: "13", field_90: "12", field_91: "22" } } |
|
|
|
|
|
|
|
|
|
|
|
it "sets value given" do |
|
|
|
it "sets value given" do |
|
|
@ -1379,6 +1390,15 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when invalid" do |
|
|
|
|
|
|
|
let(:attributes) { { bulk_upload:, field_89: "13", field_90: "13", field_91: "22" } } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not raise an error" do |
|
|
|
|
|
|
|
expect { parser.log.voiddate }.not_to raise_error |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "#startdate" do |
|
|
|
describe "#startdate" do |
|
|
|
let(:attributes) { { bulk_upload:, field_96: now.day.to_s, field_97: now.month.to_s, field_98: now.strftime("%g") } } |
|
|
|
let(:attributes) { { bulk_upload:, field_96: now.day.to_s, field_97: now.month.to_s, field_98: now.strftime("%g") } } |
|
|
|
|
|
|
|
|
|
|
|