Initial commit of foodsoft 2

This commit is contained in:
Benjamin Meichsner 2009-01-06 11:49:19 +01:00
commit 5b9a7e05df
657 changed files with 70444 additions and 0 deletions

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class ArticleCategoryTest < Test::Unit::TestCase
fixtures :article_categories
# Replace this with your real tests.
def test_truth
assert true
end
end

10
test/unit/article_test.rb Normal file
View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class ArticleTest < Test::Unit::TestCase
fixtures :articles
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class AssignmentTest < Test::Unit::TestCase
fixtures :assignments
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class FinancialTransactionTest < Test::Unit::TestCase
fixtures :financial_transactions
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class GroupOrderArticleQuantityTest < Test::Unit::TestCase
fixtures :group_order_article_quantities
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class GroupOrderArticleResultTest < Test::Unit::TestCase
fixtures :group_order_article_results
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class GroupOrderResultTest < Test::Unit::TestCase
fixtures :group_order_results
# Replace this with your real tests.
def test_truth
assert true
end
end

10
test/unit/group_test.rb Normal file
View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class GroupTest < Test::Unit::TestCase
fixtures :groups
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class MembershipTest < Test::Unit::TestCase
fixtures :memberships
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class MessagesTest < Test::Unit::TestCase
fixtures :messages
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class OrderArticleResultTest < Test::Unit::TestCase
fixtures :order_article_results
# Replace this with your real tests.
def test_truth
assert true
end
end

10
test/unit/order_test.rb Normal file
View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class OrderTest < Test::Unit::TestCase
fixtures :orders
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class SharedArticleTest < Test::Unit::TestCase
fixtures :shared_articles
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class SharedSupplierTest < Test::Unit::TestCase
fixtures :shared_suppliers
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -0,0 +1,22 @@
require File.dirname(__FILE__) + '/../test_helper'
class SupplierTest < Test::Unit::TestCase
fixtures :suppliers
def setup
@supplier = Supplier.find_by_name("Terra")
end
def test_read
assert_equal "Terra", @supplier.name
assert_equal "www.terra-natur.de", @supplier.url
end
def test_update
assert_equal "tuesday", @supplier.delivery_days
@supplier.delivery_days = 'wednesday'
assert @supplier.save, @supplier.errors.full_messages.join("; ")
@supplier.reload
assert_equal 'wednesday', @supplier.delivery_days
end
end

10
test/unit/task_test.rb Normal file
View file

@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class TaskTest < Test::Unit::TestCase
fixtures :tasks
# Replace this with your real tests.
def test_truth
assert true
end
end

33
test/unit/user_test.rb Normal file
View file

@ -0,0 +1,33 @@
require File.dirname(__FILE__) + '/../test_helper'
class UserTest < Test::Unit::TestCase
fixtures :users
def setup
@admin = users(:admin)
end
def test_read_user
assert_kind_of User, @admin
assert_equal "Anton", @admin.first_name
assert_equal "Admininistrator", @admin.last_name
assert_equal "admin@foo.test", @admin.email
assert @admin.role_admin?
end
def test_create_and_read_password
@admin.set_password({:required => true}, "secret", "secret")
@admin.save
assert @admin.has_password("secret")
end
def test_invalid_password
@admin.set_password({:required => true}, "foo", "foo")
assert_equal 'Passwort muss zwischen 6 u. 25 Zeichen haben', @admin.errors.on_base
end
def test_password_not_match
@admin.set_password({:required => true}, "foobar", "foobor")
assert_equal 'Passworteingaben stimmen nicht überein', @admin.errors.on_base
end
end