comparison test/unit/.svn/text-base/attachment_test.rb.svn-base @ 120:cd2282d2aa55 cannam

Merge from the default branch. Note that this is not a valid SVN repository any more (use default, redmine-1.1 etc for SVN updates).
author Chris Cannam
date Thu, 13 Jan 2011 14:33:08 +0000
parents af80e5618e9b 8661b858af72
children 753f1380d6bc
comparison
equal deleted inserted replaced
118:b859cc0c4fa1 120:cd2282d2aa55
32 assert a.save 32 assert a.save
33 assert_equal 'testfile.txt', a.filename 33 assert_equal 'testfile.txt', a.filename
34 assert_equal 59, a.filesize 34 assert_equal 59, a.filesize
35 assert_equal 'text/plain', a.content_type 35 assert_equal 'text/plain', a.content_type
36 assert_equal 0, a.downloads 36 assert_equal 0, a.downloads
37 assert_equal Digest::MD5.hexdigest(uploaded_test_file("testfile.txt", "text/plain").read), a.digest 37 assert_equal '1478adae0d4eb06d35897518540e25d6', a.digest
38 assert File.exist?(a.diskfile) 38 assert File.exist?(a.diskfile)
39 end 39 end
40 40
41 def test_create_should_auto_assign_content_type 41 def test_create_should_auto_assign_content_type
42 a = Attachment.new(:container => Issue.find(1), 42 a = Attachment.new(:container => Issue.find(1),