Introduced StockChange. Implemented first part of stockit-logic with updating article's quantity.

This commit is contained in:
Benjamin Meichsner 2009-01-16 02:17:49 +01:00
parent 7ff0467b16
commit b38025869a
27 changed files with 233 additions and 123 deletions

View file

@ -1,5 +1,5 @@
# == Schema Information
# Schema version: 20090115123421
# Schema version: 20090115232435
#
# Table name: articles
#

View file

@ -1,11 +1,11 @@
# == Schema Information
# Schema version: 20090115123421
# Schema version: 20090115232435
#
# Table name: messages
#
# id :integer(4) not null, primary key
# sender_id :integer(4)
# recipients_ids :text default(""), not null
# recipients_ids :text
# subject :string(255) not null
# body :text
# email_state :integer(4) default(0), not null

28
test/fixtures/stock_changes.yml vendored Normal file
View file

@ -0,0 +1,28 @@
# == Schema Information
# Schema version: 20090115232435
#
# Table name: stock_changes
#
# id :integer(4) not null, primary key
# delivery_id :integer(4)
# order_id :integer(4)
# article_id :integer(4)
# quantity :decimal(6, 2) default(0.0)
# created_at :datetime
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
delivery:
order:
article:
quantity: 1
created_at: 2009-01-16 00:24:35
two:
delivery:
order:
article:
quantity: 1
created_at: 2009-01-16 00:24:35

View file

@ -1,5 +1,5 @@
# == Schema Information
# Schema version: 20090115123421
# Schema version: 20090115232435
#
# Table name: suppliers
#

View file

@ -0,0 +1,8 @@
require 'test_helper'
class StockChangeTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end