Sha256: 6868c8f19cd1621357f8b13fefe92f6c9cd8b162a13ad6fe31ccb778d2f21965
Contents?: true
Size: 666 Bytes
Versions: 29
Compression:
Stored size: 666 Bytes
Contents
require File.expand_path('../test_helper', File.dirname(__FILE__)) class CmsUploadTest < ActiveSupport::TestCase def test_validations assert_no_difference 'CmsUpload.count' do upload = CmsUpload.create assert upload.errors.present? assert_has_errors_on upload, [:file_file_name] end end def test_create assert_difference 'CmsUpload.count' do cms_sites(:default).cms_uploads.create( :file => fixture_file_upload('files/valid_image.jpg') ) end end def test_create_failure assert_no_difference 'CmsUpload.count' do cms_sites(:default).cms_uploads.create(:file => '') end end end
Version data entries
29 entries across 29 versions & 2 rubygems