/vendor/plugins/attachment_fu/test/backends/db_file_test.rb
Ruby | 16 lines | 13 code | 3 blank | 0 comment | 0 complexity | 6d4a16b53fea6219d2c1a5e49aab6e35 MD5 | raw file
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper'))
- class DbFileTest < Test::Unit::TestCase
- include BaseAttachmentTests
- attachment_model Attachment
- def test_should_call_after_attachment_saved(klass = Attachment)
- attachment_model.saves = 0
- assert_created do
- upload_file :filename => '/files/rails.png'
- end
- assert_equal 1, attachment_model.saves
- end
-
- test_against_subclass :test_should_call_after_attachment_saved, Attachment
- end