require 'test_helper'

class RecenziesControllerTest < ActionController::TestCase
  setup do
    @recenzy = recenzies(:one)
  end

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

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

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

    assert_redirected_to recenzy_path(assigns(:recenzy))
  end

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

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

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

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

    assert_redirected_to recenzies_path
  end
end
