From 76d8a2a63821eb2afcad7e6adfd126c5448bb6c9 Mon Sep 17 00:00:00 2001 From: Siva Gollapalli Date: Wed, 26 Nov 2014 20:31:30 +0530 Subject: Issue#17703 Test case for tempfile attribute + To avoid regression I am adding this test case on action pack Changed to assert from assert_equal + Added msg to assertion Modified msg --- actionpack/test/controller/test_case_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack') diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index e348749f78..a1afdc32c7 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -908,6 +908,11 @@ XML assert_equal File.open(path, READ_PLAIN).read, plain_file_upload.read end + def test_fixture_file_upload_should_be_able_access_to_tempfile + file = fixture_file_upload(FILES_DIR + "/mona_lisa.jpg", "image/jpg") + assert file.respond_to?(:tempfile), "expected tempfile should respond on fixture file object, got nothing" + end + def test_fixture_file_upload post :test_file_upload, params: { -- cgit v1.2.3