From: eagletmt Date: Sat, 20 Oct 2012 05:14:53 +0000 (+0900) Subject: Add test serving uploaded apk X-Git-Tag: v1.0~71^2~12^2~12 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a517883d581afcea0fcb2af1413cd8c5edb632b3;p=sharp4k%2FCUTEn.git Add test serving uploaded apk --- diff --git a/CutenServer/test/functional/apks_controller_test.rb b/CutenServer/test/functional/apks_controller_test.rb index cdaf544..7cc3e87 100644 --- a/CutenServer/test/functional/apks_controller_test.rb +++ b/CutenServer/test/functional/apks_controller_test.rb @@ -45,4 +45,12 @@ class ApksControllerTest < ActionController::TestCase @apk.store_file uploaded assert File.readable?(@apk.path) end + + test "should download uploaded file" do + uploaded = fixture_file_upload 'dummy.apk', Apk::MIME_TYPE + @apk.store_file uploaded + + get :download, :id => @apk + assert_equal uploaded.read, @response.body + end end