Permalink
Browse files

add new tests

  • Loading branch information...
Philipp Brumm
Philipp Brumm committed Apr 5, 2012
1 parent a9cda45 commit 74c88f1c9b4b59b76116474e82ee63da3a05b71c
Showing with 16 additions and 0 deletions.
  1. +4 −0 test/attachment_adapter_test.rb
  2. +4 −0 test/file_adapter_test.rb
  3. +8 −0 test/uploaded_file_adapter_test.rb
@@ -16,6 +16,10 @@ def setup
assert_equal "5k.png", @subject.original_filename
end
+ should "force binmode on tempfile" do
+ assert @subject.instance_variable_get("@tempfile").binmode?
+ end
+
should "get the content type" do
assert_equal "image/png", @subject.content_type
end
@@ -12,6 +12,10 @@ class FileAdapterTest < Test::Unit::TestCase
assert_equal "5k.png", @subject.original_filename
end
+ should "force binmode on tempfile" do
+ assert @subject.instance_variable_get("@tempfile").binmode?
+ end
+
should "get the content type" do
assert_equal "image/png", @subject.content_type
end
@@ -21,6 +21,10 @@ class UploadedFile < OpenStruct; end
assert_equal "5k.png", @subject.original_filename
end
+ should "force binmode on tempfile" do
+ assert @subject.instance_variable_get("@tempfile").binmode?
+ end
+
should "get the content type" do
assert_equal "image/png", @subject.content_type
end
@@ -61,6 +65,10 @@ class UploadedFile < OpenStruct; end
assert_equal "5k.png", @subject.original_filename
end
+ should "force binmode on tempfile" do
+ assert @subject.instance_variable_get("@tempfile").binmode?
+ end
+
should "get the content type" do
assert_equal "image/png", @subject.content_type
end

0 comments on commit 74c88f1

Please sign in to comment.