require 'test_helper'

class KlientisControllerTest < ActionController::TestCase
  setup do
    @klienti = klientis(:one)
  end

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

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

  test "should create klienti" do
    assert_difference('Klienti.count') do
      post :create, klienti: @klienti.attributes
    end

    assert_redirected_to klienti_path(assigns(:klienti))
  end

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

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

  test "should update klienti" do
    put :update, id: @klienti, klienti: @klienti.attributes
    assert_redirected_to klienti_path(assigns(:klienti))
  end

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

    assert_redirected_to klientis_path
  end
end
