require 'test_helper'

class NoUsesControllerTest < ActionController::TestCase
  setup do
    @no_use = no_uses(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:no_uses)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  test "should create no_use" do
    assert_difference('NoUse.count') do
      post :create, no_use: {  }
    end

    assert_redirected_to no_use_path(assigns(:no_use))
  end

  test "should show no_use" do
    get :show, id: @no_use
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @no_use
    assert_response :success
  end

  test "should update no_use" do
    put :update, id: @no_use, no_use: {  }
    assert_redirected_to no_use_path(assigns(:no_use))
  end

  test "should destroy no_use" do
    assert_difference('NoUse.count', -1) do
      delete :destroy, id: @no_use
    end

    assert_redirected_to no_uses_path
  end
end
