|
|
|
@ -5,6 +5,14 @@ RSpec.describe BulkUpload::Lettings::RowParser do |
|
|
|
|
|
|
|
|
|
|
|
let(:attributes) { {} } |
|
|
|
let(:attributes) { {} } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
around do |example| |
|
|
|
|
|
|
|
FormHandler.instance.use_real_forms! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
example.run |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormHandler.instance.use_fake_forms! |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "validations" do |
|
|
|
describe "validations" do |
|
|
|
before do |
|
|
|
before do |
|
|
|
parser.valid? |
|
|
|
parser.valid? |
|
|
|
@ -70,6 +78,14 @@ RSpec.describe BulkUpload::Lettings::RowParser do |
|
|
|
expect(parser.errors[:field_4]).to be_present |
|
|
|
expect(parser.errors[:field_4]).to be_present |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when matching scheme cannot be found" do |
|
|
|
|
|
|
|
let(:attributes) { { field_1: "1", field_4: "123" } } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xit "returns an error" do |
|
|
|
|
|
|
|
expect(parser.errors[:field_4]).to be_present |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "#field_134" do |
|
|
|
describe "#field_134" do |
|
|
|
|