Sha256: 3158c8f6b38e305c50f63412beed84675c3d7f44ae27d23c77a16a3bb6051320

Contents?: true

Size: 1.27 KB

Versions: 6

Compression:

Stored size: 1.27 KB

Contents

require 'test_helper'

module Wafflemix
  class AssetsControllerTest < ActionController::TestCase
    setup do
      @asset = assets(:one)
    end
  
    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:assets)
    end
  
    test "should get new" do
      get :new
      assert_response :success
    end
  
    test "should create asset" do
      assert_difference('Asset.count') do
        post :create, asset: { asset_file_size: @asset.asset_file_size, asset_mime_type: @asset.asset_mime_type, asset_uid: @asset.asset_uid }
      end
  
      assert_redirected_to asset_path(assigns(:asset))
    end
  
    test "should show asset" do
      get :show, id: @asset
      assert_response :success
    end
  
    test "should get edit" do
      get :edit, id: @asset
      assert_response :success
    end
  
    test "should update asset" do
      put :update, id: @asset, asset: { asset_file_size: @asset.asset_file_size, asset_mime_type: @asset.asset_mime_type, asset_uid: @asset.asset_uid }
      assert_redirected_to asset_path(assigns(:asset))
    end
  
    test "should destroy asset" do
      assert_difference('Asset.count', -1) do
        delete :destroy, id: @asset
      end
  
      assert_redirected_to assets_path
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wafflemix-0.0.6 test/functional/wafflemix/assets_controller_test.rb
wafflemix-0.0.5 test/functional/wafflemix/assets_controller_test.rb
wafflemix-0.0.4 test/functional/wafflemix/assets_controller_test.rb
wafflemix-0.0.3 test/functional/wafflemix/assets_controller_test.rb
wafflemix-0.0.2 test/functional/wafflemix/assets_controller_test.rb
wafflemix-0.0.1 test/functional/wafflemix/assets_controller_test.rb