foodsoft/db/seeds/minimal.seeds.rb
Philipp Rothmann fb2b4d8a8a chore: rubocop
chore: fix api test conventions

chore: rubocop -A spec/

chore: more rubocop -A

fix failing test

rubocop fixes

removes helper methods that are in my opinion dead code

more rubocop fixes

rubocop -a --auto-gen-config
2023-06-09 17:35:05 +02:00

31 lines
982 B
Ruby

# Create nessecary data to start with a fresh installation
# Create working group with full rights
administrators = Workgroup.create!(
name: 'Administrators',
description: 'System administrators.',
role_admin: true,
role_finance: true,
role_article_meta: true,
role_pickups: true,
role_suppliers: true,
role_orders: true
)
# Create admin user
User.create!(
nick: 'admin',
first_name: 'Anton',
last_name: 'Administrator',
email: 'admin@foo.test',
password: 'secret',
groups: [administrators]
)
# First entry for financial transaction types
financial_transaction_class = FinancialTransactionClass.create!(name: 'Other')
FinancialTransactionType.create!(name: 'Foodcoop', financial_transaction_class_id: financial_transaction_class.id)
# First entry for article categories
SupplierCategory.create!(name: 'Other', financial_transaction_class_id: financial_transaction_class.id)
ArticleCategory.create!(name: 'Other', description: 'other, misc, unknown')