require 'test_helper'

class ZamestnancisControllerTest < ActionController::TestCase
  setup do
    @zamestnanci = zamestnancis(:one)
    @update = {
      :ID_Zam => '35000',
      :Meno => 'Sdur',
      :Priezvisko => 'Sdur', 
      :Ulica => 'Sdur', 
      :Mesto => 'Sdur', 
      :Stat => 'Sdur', 
      :Telefon => 'Sdur', 
      :Email => 'Sdur', 
      :Cislo_Bank_Uctu => 'Sdur', 
      :Login_IS_Ucet => '', 
      :Heslo_IS_Ucet => ''
    }
  end

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

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

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

    assert_redirected_to zamestnanci_path(assigns(:zamestnanci))
  end

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

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

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

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

    assert_redirected_to zamestnancis_path
  end
end
