Sha256: cd59dc913c138c28569e43d822953608f65b2655260f9442fe6b72763687a4cd
Contents?: true
Size: 622 Bytes
Versions: 8
Compression:
Stored size: 622 Bytes
Contents
require 'test_helper' class CmsAdmin::UploadsControllerTest < ActionController::TestCase def test_create assert_difference 'CmsUpload.count', 1 do xhr :post, :create, :file => fixture_file_upload('files/valid_image.jpg') assert_response :success end end def test_create_fails assert_no_difference 'CmsUpload.count' do xhr :post, :create, :file => nil assert_response :bad_request end end def test_destroy assert_difference 'CmsUpload.count', -1 do xhr :delete, :destroy, :id => cms_uploads(:default) assert_response :success end end end
Version data entries
8 entries across 8 versions & 1 rubygems