Initial commit of foodsoft 2
This commit is contained in:
commit
5b9a7e05df
657 changed files with 70444 additions and 0 deletions
10
test/unit/article_category_test.rb
Normal file
10
test/unit/article_category_test.rb
Normal 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
10
test/unit/article_test.rb
Normal 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
|
||||
10
test/unit/assignment_test.rb
Normal file
10
test/unit/assignment_test.rb
Normal 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
|
||||
10
test/unit/financial_transaction_test.rb
Normal file
10
test/unit/financial_transaction_test.rb
Normal 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
|
||||
10
test/unit/group_order_article_quantity_test.rb
Normal file
10
test/unit/group_order_article_quantity_test.rb
Normal 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
|
||||
10
test/unit/group_order_article_result_test.rb
Normal file
10
test/unit/group_order_article_result_test.rb
Normal 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
|
||||
10
test/unit/group_order_result_test.rb
Normal file
10
test/unit/group_order_result_test.rb
Normal 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
10
test/unit/group_test.rb
Normal 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
|
||||
10
test/unit/membership_test.rb
Normal file
10
test/unit/membership_test.rb
Normal 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
|
||||
10
test/unit/messages_test.rb
Normal file
10
test/unit/messages_test.rb
Normal 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
|
||||
10
test/unit/order_article_result_test.rb
Normal file
10
test/unit/order_article_result_test.rb
Normal 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
10
test/unit/order_test.rb
Normal 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
|
||||
10
test/unit/shared_article_test.rb
Normal file
10
test/unit/shared_article_test.rb
Normal 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
|
||||
10
test/unit/shared_supplier_test.rb
Normal file
10
test/unit/shared_supplier_test.rb
Normal 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
|
||||
22
test/unit/supplier_test.rb
Normal file
22
test/unit/supplier_test.rb
Normal 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
10
test/unit/task_test.rb
Normal 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
33
test/unit/user_test.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue