Permalink
Browse files

Add spec for attachment without upload.

  • Loading branch information...
1 parent bc16618 commit cdf403191ff7217fc8d1542734b65c25dd242911 @Manfred committed Jun 3, 2014
Showing with 13 additions and 0 deletions.
  1. +13 −0 test/variant_test.rb
View
@@ -188,4 +188,17 @@
result = @variant.process!
result.should == :from_process_proc
end
+end
+
+describe "AttachmentSan::Variant without an uploaded file" do
+ before do
+ @document = Document.new
+ @variant = @document.misc_files.build.original
+ end
+
+ it "should not break during processing" do
+ lambda do
+ @variant.process!
+ end.should.not.raise
+ end
end

0 comments on commit cdf4031

Please sign in to comment.