Introduced StockTaking. TODO: Dry up the stockit/stock_takings/deliveries controllers/views!

This commit is contained in:
Benjamin Meichsner 2009-02-12 18:32:20 +01:00
parent 2bb4cdb9d6
commit 951d19db6a
30 changed files with 436 additions and 55 deletions

View file

@ -0,0 +1,45 @@
require 'test_helper'
class StockTakingsControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:stock_takings)
end
test "should get new" do
get :new
assert_response :success
end
test "should create stock_taking" do
assert_difference('StockTaking.count') do
post :create, :stock_taking => { }
end
assert_redirected_to stock_taking_path(assigns(:stock_taking))
end
test "should show stock_taking" do
get :show, :id => stock_takings(:one).id
assert_response :success
end
test "should get edit" do
get :edit, :id => stock_takings(:one).id
assert_response :success
end
test "should update stock_taking" do
put :update, :id => stock_takings(:one).id, :stock_taking => { }
assert_redirected_to stock_taking_path(assigns(:stock_taking))
end
test "should destroy stock_taking" do
assert_difference('StockTaking.count', -1) do
delete :destroy, :id => stock_takings(:one).id
end
assert_redirected_to stock_takings_path
end
end