require 'test_helper'

class KontaktneOsobiesControllerTest < ActionController::TestCase
  setup do
    @kontaktne_osoby = kontaktne_osobies(:one)
  end

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

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

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

    assert_redirected_to kontaktne_osoby_path(assigns(:kontaktne_osoby))
  end

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

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

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

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

    assert_redirected_to kontaktne_osobies_path
  end
end
