Sha256: fd10bba2b4342203db406e60e23aa82fdc4daf7b7150734847deb277bdae85ad
Contents?: true
Size: 670 Bytes
Versions: 21
Compression:
Stored size: 670 Bytes
Contents
require File.expand_path('../../test_helper', File.dirname(__FILE__)) 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
21 entries across 21 versions & 2 rubygems