Moved User.address-info into Ordergroup.contact_... attributes. Updated model-fixtures for testing.
This commit is contained in:
parent
aa47a24fda
commit
0a2a79237a
60 changed files with 466 additions and 443 deletions
8
test/fixtures/article_categories.yml
vendored
8
test/fixtures/article_categories.yml
vendored
|
|
@ -1,14 +1,16 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090102171850
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: article_categories
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# id :integer not null, primary key
|
||||
# name :string(255) default(""), not null
|
||||
# description :string(255)
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
fruits:
|
||||
id: 1
|
||||
name: Fruits
|
||||
description: fruits and only fruits
|
||||
vegi:
|
||||
name: Vegetables
|
||||
|
|
|
|||
40
test/fixtures/article_prices.yml
vendored
40
test/fixtures/article_prices.yml
vendored
|
|
@ -1,27 +1,39 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090120184410
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: article_prices
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# article_id :integer(4)
|
||||
# id :integer not null, primary key
|
||||
# article_id :integer
|
||||
# price :decimal(8, 2) default(0.0), not null
|
||||
# tax :decimal(8, 2) default(0.0), not null
|
||||
# deposit :decimal(8, 2) default(0.0), not null
|
||||
# unit_quantity :integer(4)
|
||||
# unit_quantity :integer
|
||||
# created_at :datetime
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
|
||||
one:
|
||||
price: 9.99
|
||||
tax: 9.99
|
||||
deposit: 9.99
|
||||
unit_quantity: 1
|
||||
banana1:
|
||||
article: banana
|
||||
price: 1.45
|
||||
tax: 7.0
|
||||
unit_quantity: 18
|
||||
|
||||
two:
|
||||
price: 9.99
|
||||
tax: 9.99
|
||||
deposit: 9.99
|
||||
unit_quantity: 1
|
||||
banana2:
|
||||
article: banana
|
||||
price: 1.35
|
||||
tax: 7.0
|
||||
unit_quantity: 18
|
||||
|
||||
kiwi1:
|
||||
article: kiwi
|
||||
price: 1.11
|
||||
tax: 7.0
|
||||
unit_quantity: 10
|
||||
|
||||
potatoe1:
|
||||
article: potatoe
|
||||
price: 1.33
|
||||
tax: 7.0
|
||||
unit_quantity: 25
|
||||
68
test/fixtures/articles.yml
vendored
68
test/fixtures/articles.yml
vendored
|
|
@ -3,53 +3,59 @@
|
|||
#
|
||||
# Table name: articles
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# id :integer not null, primary key
|
||||
# name :string(255) default(""), not null
|
||||
# supplier_id :integer(4) default(0), not null
|
||||
# article_category_id :integer(4) default(0), not null
|
||||
# supplier_id :integer default(0), not null
|
||||
# article_category_id :integer default(0), not null
|
||||
# unit :string(255) default(""), not null
|
||||
# note :string(255)
|
||||
# availability :boolean(1) default(TRUE), not null
|
||||
# availability :boolean default(TRUE), not null
|
||||
# manufacturer :string(255)
|
||||
# origin :string(255)
|
||||
# shared_updated_on :datetime
|
||||
# price :decimal(8, 2)
|
||||
# price :decimal(, )
|
||||
# tax :float
|
||||
# deposit :decimal(8, 2) default(0.0)
|
||||
# unit_quantity :integer(4) default(1), not null
|
||||
# deposit :decimal(, ) default(0.0)
|
||||
# unit_quantity :integer default(1), not null
|
||||
# order_number :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# quantity :decimal(6, 2) default(0.0)
|
||||
# quantity :decimal(, ) default(0.0)
|
||||
# deleted_at :datetime
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
banana:
|
||||
id: 1
|
||||
name: banana
|
||||
current_price_id: 1
|
||||
unit: 500g
|
||||
availability: 1
|
||||
supplier: terra
|
||||
name: Banana
|
||||
article_category: fruits
|
||||
unit: KG
|
||||
availability: true
|
||||
note: delicious
|
||||
supplier_id: 1
|
||||
article_category_id: 1
|
||||
origin: EC
|
||||
price: 1.45
|
||||
tax: 7.0
|
||||
unit_quantity: 18
|
||||
order_number: 123456
|
||||
kiwi:
|
||||
id: 2
|
||||
name: kiwi
|
||||
current_price_id: 2
|
||||
supplier: terra
|
||||
name: Kiwi
|
||||
article_category: fruits
|
||||
unit: 500g
|
||||
availability: 1
|
||||
note: delicious
|
||||
supplier_id: 1
|
||||
article_category_id: 1
|
||||
apple:
|
||||
id: 3
|
||||
name: apple
|
||||
current_price_id: 3
|
||||
availability: true
|
||||
origin: IT
|
||||
price: 1.11
|
||||
tax: 7.0
|
||||
unit_quantity: 10
|
||||
order_number: 123457
|
||||
potatoe:
|
||||
supplier: terra
|
||||
name: Potatoe
|
||||
article_category: vegi
|
||||
unit: 500g
|
||||
availability: 0
|
||||
note: delicious
|
||||
supplier_id: 1
|
||||
article_category_id: 1
|
||||
|
||||
availability: true
|
||||
origin: REG
|
||||
price: 1.33
|
||||
tax: 7.0
|
||||
unit_quantity: 25
|
||||
order_number: 123458
|
||||
|
|
|
|||
14
test/fixtures/assignments.yml
vendored
14
test/fixtures/assignments.yml
vendored
|
|
@ -1,16 +1,12 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090102171850
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: assignments
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# user_id :integer(4) default(0), not null
|
||||
# task_id :integer(4) default(0), not null
|
||||
# accepted :boolean(1)
|
||||
# id :integer not null, primary key
|
||||
# user_id :integer default(0), not null
|
||||
# task_id :integer default(0), not null
|
||||
# accepted :boolean
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
one:
|
||||
id: 1
|
||||
two:
|
||||
id: 2
|
||||
|
|
|
|||
26
test/fixtures/financial_transactions.yml
vendored
26
test/fixtures/financial_transactions.yml
vendored
|
|
@ -1,18 +1,26 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090114101610
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: financial_transactions
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# ordergroup_id :integer(4) default(0), not null
|
||||
# id :integer not null, primary key
|
||||
# ordergroup_id :integer default(0), not null
|
||||
# amount :decimal(8, 2) default(0.0), not null
|
||||
# note :text default(""), not null
|
||||
# user_id :integer(4) default(0), not null
|
||||
# note :text not null
|
||||
# user_id :integer default(0), not null
|
||||
# created_on :datetime not null
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
another:
|
||||
id: 2
|
||||
bananas1:
|
||||
ordergroup: bananas
|
||||
amount: 0.00
|
||||
note: "Deposit for 3 people: 15,-€"
|
||||
user: admin
|
||||
created_on: <%= 2.weeks.ago.strftime("%d.%m.%Y") %>
|
||||
|
||||
bananas2:
|
||||
ordergroup: bananas
|
||||
amount: 100.00
|
||||
note: Paying in from <%= 1.weeks.ago.strftime("%d.%m.%Y") %>
|
||||
created_on: <%= 1.weeks.ago.strftime("%d.%m.%Y") %>
|
||||
|
|
|
|||
15
test/fixtures/group_order_article_quantities.yml
vendored
15
test/fixtures/group_order_article_quantities.yml
vendored
|
|
@ -1,17 +1,14 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090102171850
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: group_order_article_quantities
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# group_order_article_id :integer(4) default(0), not null
|
||||
# quantity :integer(4) default(0)
|
||||
# tolerance :integer(4) default(0)
|
||||
# id :integer not null, primary key
|
||||
# group_order_article_id :integer default(0), not null
|
||||
# quantity :integer default(0)
|
||||
# tolerance :integer default(0)
|
||||
# created_on :datetime not null
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
another:
|
||||
id: 2
|
||||
|
||||
|
|
|
|||
49
test/fixtures/groups.yml
vendored
49
test/fixtures/groups.yml
vendored
|
|
@ -3,37 +3,44 @@
|
|||
#
|
||||
# Table name: groups
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# id :integer not null, primary key
|
||||
# type :string(255) default(""), not null
|
||||
# name :string(255) default(""), not null
|
||||
# description :string(255)
|
||||
# actual_size :integer(4)
|
||||
# account_balance :decimal(8, 2) default(0.0), not null
|
||||
# account_balance :decimal(, ) default(0.0), not null
|
||||
# account_updated :datetime
|
||||
# created_on :datetime not null
|
||||
# role_admin :boolean(1) not null
|
||||
# role_suppliers :boolean(1) not null
|
||||
# role_article_meta :boolean(1) not null
|
||||
# role_finance :boolean(1) not null
|
||||
# role_orders :boolean(1) not null
|
||||
# weekly_task :boolean(1)
|
||||
# weekday :integer(4)
|
||||
# role_admin :boolean not null
|
||||
# role_suppliers :boolean not null
|
||||
# role_article_meta :boolean not null
|
||||
# role_finance :boolean not null
|
||||
# role_orders :boolean not null
|
||||
# weekly_task :boolean
|
||||
# weekday :integer
|
||||
# task_name :string(255)
|
||||
# task_description :string(255)
|
||||
# task_required_users :integer(4) default(1)
|
||||
# task_required_users :integer default(1)
|
||||
# deleted_at :datetime
|
||||
# contact_person :string(255)
|
||||
# contact_phone :string(255)
|
||||
# contact_address :string(255)
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
name: Order Group 1
|
||||
type: Ordergroup
|
||||
another:
|
||||
id: 2
|
||||
name: Order Group 2
|
||||
type: Ordergroup
|
||||
admins:
|
||||
id: 3
|
||||
type: Workgroup
|
||||
name: Administrators
|
||||
role_admin: true
|
||||
description: System administrators.
|
||||
role_admin: true
|
||||
role_suppliers: true
|
||||
role_article_meta: true
|
||||
role_finance: true
|
||||
role_orders: true
|
||||
bananas:
|
||||
type: Ordergroup
|
||||
name: Banangroup
|
||||
account_balance: 100.00
|
||||
account_updated: <%= 1.weeks.ago.strftime("%d.%m.%Y") %>
|
||||
contact_person: Tim
|
||||
contact_phone: 030 123132456
|
||||
contact_address: Waldermarstrasse 43, 10988 Berlin
|
||||
|
|
|
|||
20
test/fixtures/memberships.yml
vendored
20
test/fixtures/memberships.yml
vendored
|
|
@ -1,20 +1,18 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090102171850
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: memberships
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# group_id :integer(4) default(0), not null
|
||||
# user_id :integer(4) default(0), not null
|
||||
# id :integer not null, primary key
|
||||
# group_id :integer default(0), not null
|
||||
# user_id :integer default(0), not null
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
group_id: 3
|
||||
user_id: 1
|
||||
another:
|
||||
id: 2
|
||||
group_id: 1
|
||||
user_id: 2
|
||||
group: admins
|
||||
user: admin
|
||||
second:
|
||||
group: bananas
|
||||
user: test
|
||||
|
||||
|
|
|
|||
15
test/fixtures/messages.yml
vendored
15
test/fixtures/messages.yml
vendored
|
|
@ -1,20 +1,17 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090115232435
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: messages
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# sender_id :integer(4)
|
||||
# id :integer not null, primary key
|
||||
# sender_id :integer
|
||||
# recipients_ids :text
|
||||
# subject :string(255) not null
|
||||
# body :text
|
||||
# email_state :integer(4) default(0), not null
|
||||
# private :boolean(1)
|
||||
# email_state :integer default(0), not null
|
||||
# private :boolean
|
||||
# created_at :datetime
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
one:
|
||||
id: 1
|
||||
two:
|
||||
id: 2
|
||||
|
||||
|
|
|
|||
14
test/fixtures/order_comments.yml
vendored
14
test/fixtures/order_comments.yml
vendored
|
|
@ -1,19 +1,13 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090120184410
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: order_comments
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# order_id :integer(4)
|
||||
# user_id :integer(4)
|
||||
# id :integer not null, primary key
|
||||
# order_id :integer
|
||||
# user_id :integer
|
||||
# text :text
|
||||
# created_at :datetime
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
|
||||
# one:
|
||||
# column: value
|
||||
#
|
||||
# two:
|
||||
# column: value
|
||||
|
|
|
|||
14
test/fixtures/orders.yml
vendored
14
test/fixtures/orders.yml
vendored
|
|
@ -1,20 +1,16 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090120184410
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: orders
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# supplier_id :integer(4)
|
||||
# id :integer not null, primary key
|
||||
# supplier_id :integer
|
||||
# note :text
|
||||
# starts :datetime
|
||||
# ends :datetime
|
||||
# state :string(255) default("open")
|
||||
# lock_version :integer(4) default(0), not null
|
||||
# updated_by_user_id :integer(4)
|
||||
# lock_version :integer default(0), not null
|
||||
# updated_by_user_id :integer
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
another:
|
||||
id: 2
|
||||
|
|
|
|||
5
test/fixtures/roles.yml
vendored
5
test/fixtures/roles.yml
vendored
|
|
@ -1,5 +0,0 @@
|
|||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
another:
|
||||
id: 2
|
||||
24
test/fixtures/stock_changes.yml
vendored
24
test/fixtures/stock_changes.yml
vendored
|
|
@ -1,28 +1,14 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090115232435
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: stock_changes
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# delivery_id :integer(4)
|
||||
# order_id :integer(4)
|
||||
# article_id :integer(4)
|
||||
# id :integer not null, primary key
|
||||
# delivery_id :integer
|
||||
# order_id :integer
|
||||
# article_id :integer
|
||||
# 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
|
||||
|
|
|
|||
25
test/fixtures/suppliers.yml
vendored
25
test/fixtures/suppliers.yml
vendored
|
|
@ -19,17 +19,20 @@
|
|||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
first:
|
||||
id: 1
|
||||
terra:
|
||||
name: Terra
|
||||
delivery_days: tuesday
|
||||
contact_person: thomas terra
|
||||
url: www.terra-natur.de
|
||||
note:
|
||||
fax: 01324-343444
|
||||
phone: 0123-555555
|
||||
order_howto:
|
||||
phone2: 01234-7878787
|
||||
address: berlin bio
|
||||
customer_number: 123478
|
||||
phone: 0123-555555
|
||||
phone2: 01234-7878787
|
||||
fax: 01324-343444
|
||||
email: terra@terra.com
|
||||
url: www.terra-natur.de
|
||||
contact_person: Harry
|
||||
customer_number: 123478
|
||||
delivery_days: tuesday
|
||||
order_howto: call or send email/fax
|
||||
note:
|
||||
Terra possibly delivers also on other days than tuesday. Don't
|
||||
hesitate to ask for it.
|
||||
min_order_quantity: 80,-€ (gross)
|
||||
|
||||
|
|
|
|||
18
test/fixtures/tasks.yml
vendored
18
test/fixtures/tasks.yml
vendored
|
|
@ -1,22 +1,18 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090114101610
|
||||
# Schema version: 20090119155930
|
||||
#
|
||||
# Table name: tasks
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# id :integer not null, primary key
|
||||
# name :string(255) default(""), not null
|
||||
# description :string(255)
|
||||
# due_date :date
|
||||
# done :boolean(1)
|
||||
# workgroup_id :integer(4)
|
||||
# assigned :boolean(1)
|
||||
# done :boolean
|
||||
# workgroup_id :integer
|
||||
# assigned :boolean
|
||||
# created_on :datetime not null
|
||||
# updated_on :datetime not null
|
||||
# required_users :integer(4) default(1)
|
||||
# required_users :integer default(1)
|
||||
#
|
||||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
one:
|
||||
id: 1
|
||||
two:
|
||||
id: 2
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
14
test/fixtures/users.yml
vendored
14
test/fixtures/users.yml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090102171850
|
||||
# Schema version: 20090120184410
|
||||
#
|
||||
# Table name: users
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# id :integer not null, primary key
|
||||
# nick :string(255) default(""), not null
|
||||
# password_hash :string(255) default(""), not null
|
||||
# password_salt :string(255) default(""), not null
|
||||
|
|
@ -11,7 +11,6 @@
|
|||
# last_name :string(255) default(""), not null
|
||||
# email :string(255) default(""), not null
|
||||
# phone :string(255)
|
||||
# address :string(255)
|
||||
# created_on :datetime not null
|
||||
# reset_password_token :string(255)
|
||||
# reset_password_expires :datetime
|
||||
|
|
@ -20,17 +19,16 @@
|
|||
|
||||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
admin:
|
||||
id: 1
|
||||
nick: admin
|
||||
first_name: Anton
|
||||
last_name: Admininistrator
|
||||
email: admin@foo.test
|
||||
#TODO: password can't loaded directyl to the database
|
||||
#password_hash:
|
||||
#password_salt:
|
||||
password_hash: a3c77e64311ad37161e582b28737d1e420962538
|
||||
password_salt: LNpP/lca
|
||||
test:
|
||||
id: 2
|
||||
nick: test
|
||||
first_name: Tim
|
||||
last_name: Tester
|
||||
email: test@foo.test
|
||||
password_hash: 5549cd54032a72435037893b02d95ebef13cdc57
|
||||
password_salt: DxnbIF1h
|
||||
|
|
|
|||
7
test/fixtures/workgroups.yml
vendored
7
test/fixtures/workgroups.yml
vendored
|
|
@ -1,7 +0,0 @@
|
|||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
|
||||
# one:
|
||||
# column: value
|
||||
#
|
||||
# two:
|
||||
# column: value
|
||||
Loading…
Add table
Add a link
Reference in a new issue