|
|
|
|
@ -35,6 +35,18 @@ RSpec.describe BulkUpload::Lettings::Validator do
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "and has a new line in it (empty)" do |
|
|
|
|
before do |
|
|
|
|
file.write("\n") |
|
|
|
|
file.rewind |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "is not valid" do |
|
|
|
|
expect(validator).not_to be_valid |
|
|
|
|
expect(validator.errors["base"]).to eql(["Template is blank - The template must be filled in for us to create the logs and check if data is correct."]) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "and doesn't have too many columns" do |
|
|
|
|
before do |
|
|
|
|
file.write(("a" * 95).chars.join(",")) |
|
|
|
|
|