require 'test_helper'

class FilterCriteriaValuesControllerTest < ActionController::TestCase
  setup do
    @filter_criteria_value = filter_criteria_values(:one)
  end

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

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

  test "should create filter_criteria_value" do
    assert_difference('FilterCriteriaValue.count') do
      post :create, filter_criteria_value: { filter_criteria_id: @filter_criteria_value.filter_criteria_id, filter_text: @filter_criteria_value.filter_text, filter_value: @filter_criteria_value.filter_value }
    end

    assert_redirected_to filter_criteria_value_path(assigns(:filter_criteria_value))
  end

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

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

  test "should update filter_criteria_value" do
    patch :update, id: @filter_criteria_value, filter_criteria_value: { filter_criteria_id: @filter_criteria_value.filter_criteria_id, filter_text: @filter_criteria_value.filter_text, filter_value: @filter_criteria_value.filter_value }
    assert_redirected_to filter_criteria_value_path(assigns(:filter_criteria_value))
  end

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

    assert_redirected_to filter_criteria_values_path
  end
end
