Removed unused test files.

This commit is contained in:
benni 2012-08-27 08:46:45 +02:00
parent 971e80b505
commit 610b851111
50 changed files with 0 additions and 901 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -1,18 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'admin_controller'
# Re-raise errors caught by the controller.
class AdminController; def rescue_action(e) raise e end; end
class AdminControllerTest < Test::Unit::TestCase
def setup
@controller = AdminController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
# Replace this with your real tests.
def test_truth
assert true
end
end

View File

@ -1,45 +0,0 @@
require 'test_helper'
class ArticleCategoriesControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:article_categories)
end
test "should get new" do
get :new
assert_response :success
end
test "should create article_category" do
assert_difference('ArticleCategory.count') do
post :create, :article_category => { }
end
assert_redirected_to article_category_path(assigns(:article_category))
end
test "should show article_category" do
get :show, :id => article_categories(:one).id
assert_response :success
end
test "should get edit" do
get :edit, :id => article_categories(:one).id
assert_response :success
end
test "should update article_category" do
put :update, :id => article_categories(:one).id, :article_category => { }
assert_redirected_to article_category_path(assigns(:article_category))
end
test "should destroy article_category" do
assert_difference('ArticleCategory.count', -1) do
delete :destroy, :id => article_categories(:one).id
end
assert_redirected_to article_categories_path
end
end

View File

@ -1,88 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'articles_controller'
# Re-raise errors caught by the controller.
class ArticlesController; def rescue_action(e) raise e end; end
class ArticlesControllerTest < Test::Unit::TestCase
fixtures :articles
def setup
@controller = ArticlesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
def test_index
get :index
assert_response :success
assert_template 'list'
end
def test_list
get :list
assert_response :success
assert_template 'list'
assert_not_nil assigns(:articles)
end
def test_show
get :show, :id => 1
assert_response :success
assert_template 'show'
assert_not_nil assigns(:article)
assert assigns(:article).valid?
end
def test_new
get :new
assert_response :success
assert_template 'new'
assert_not_nil assigns(:article)
end
def test_create
num_articles = Article.count
post :create, :article => {}
assert_response :redirect
assert_redirected_to :action => 'list'
assert_equal num_articles + 1, Article.count
end
def test_edit
get :edit, :id => 1
assert_response :success
assert_template 'edit'
assert_not_nil assigns(:article)
assert assigns(:article).valid?
end
def test_update
post :update, :id => 1
assert_response :redirect
assert_redirected_to :action => 'show', :id => 1
end
def test_destroy
assert_not_nil Article.find(1)
post :destroy, :id => 1
assert_response :redirect
assert_redirected_to :action => 'list'
assert_raise(ActiveRecord::RecordNotFound) {
Article.find(1)
}
end
end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,20 +0,0 @@
require 'test_helper'
class InvitesControllerTest < ActionController::TestCase
def test_new
get :new
assert_template 'new'
end
def test_create_invalid
Invite.any_instance.stubs(:valid?).returns(false)
post :create
assert_template 'new'
end
def test_create_valid
Invite.any_instance.stubs(:valid?).returns(true)
post :create
assert_redirected_to root_url
end
end

View File

@ -1,50 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'login_controller'
# Re-raise errors caught by the controller.
class LoginController; def rescue_action(e) raise e end; end
class LoginControllerTest < Test::Unit::TestCase
fixtures :users
def setup
@controller = LoginController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@admin = User.find(1)
@admin.set_password({:required => true}, "secret", "secret")
@admin.save
@emails = ActionMailer::Base.deliveries
@emails.clear
end
def test_login_with_invalid_user
post :login, :login => {:user => 'bubu', :password => 'baba'}
assert_response :success
assert_equal "Sorry, anmelden nicht möglich", assigns(:error)
end
def test_login_with_valid_user
post :login, :login => {:user => 'admin', :password => 'secret'}
assert_redirected_to :controller => 'index'
#assert_not_nil session[:user_nick] #TODO: make this work !
#user = User.find(session[:user_id])
#assert_equal 'admin@foo.test', user.email
end
def test_reset_password_with_invalid_email
post :reset_password, :login => {:email => "admin@bubu.baba"}
assert_match "Leider keine passende Emailadresse", flash[:error]
end
def test_reset_password_and_mail_delivery
post :reset_password, :login => {:email => "admin@foo.test"}
assert_redirected_to :action => 'login'
assert_equal 1, @emails.size #FIXME: Why this doesn't function ?
email = @email.first
assert_match(/admin/, response.subject)
assert_equal("admin@foo.test", response.to[0])
assert_match(/Dein Passwort neues lautet: /, response.body)
end
end

View File

@ -1,92 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'messages_controller'
# Re-raise errors caught by the controller.
class MessagesController; def rescue_action(e) raise e end; end
class MessagesControllerTest < Test::Unit::TestCase
fixtures :messages
def setup
@controller = MessagesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@first_id = messages(:first).id
end
def test_index
get :index
assert_response :success
assert_template 'list'
end
def test_list
get :list
assert_response :success
assert_template 'list'
assert_not_nil assigns(:messages)
end
def test_show
get :show, :id => @first_id
assert_response :success
assert_template 'show'
assert_not_nil assigns(:messages)
assert assigns(:messages).valid?
end
def test_new
get :new
assert_response :success
assert_template 'new'
assert_not_nil assigns(:messages)
end
def test_create
num_messages = Messages.count
post :create, :messages => {}
assert_response :redirect
assert_redirected_to :action => 'list'
assert_equal num_messages + 1, Messages.count
end
def test_edit
get :edit, :id => @first_id
assert_response :success
assert_template 'edit'
assert_not_nil assigns(:messages)
assert assigns(:messages).valid?
end
def test_update
post :update, :id => @first_id
assert_response :redirect
assert_redirected_to :action => 'show', :id => @first_id
end
def test_destroy
assert_nothing_raised {
Messages.find(@first_id)
}
post :destroy, :id => @first_id
assert_response :redirect
assert_redirected_to :action => 'list'
assert_raise(ActiveRecord::RecordNotFound) {
Messages.find(@first_id)
}
end
end

View File

@ -1,9 +0,0 @@
require 'test_helper'
class OrderCommentsControllerTest < ActionController::TestCase
test "should get new" do
get :new
assert_response :success
end
end

View File

@ -1,88 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'orders_controller'
# Re-raise errors caught by the controller.
class OrdersController; def rescue_action(e) raise e end; end
class OrdersControllerTest < Test::Unit::TestCase
fixtures :orders
def setup
@controller = OrdersController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
def test_index
get :index
assert_response :success
assert_template 'list'
end
def test_list
get :list
assert_response :success
assert_template 'list'
assert_not_nil assigns(:orders)
end
def test_show
get :show, :id => 1
assert_response :success
assert_template 'show'
assert_not_nil assigns(:order)
assert assigns(:order).valid?
end
def test_new
get :new
assert_response :success
assert_template 'new'
assert_not_nil assigns(:order)
end
def test_create
num_orders = Order.count
post :create, :order => {}
assert_response :redirect
assert_redirected_to :action => 'list'
assert_equal num_orders + 1, Order.count
end
def test_edit
get :edit, :id => 1
assert_response :success
assert_template 'edit'
assert_not_nil assigns(:order)
assert assigns(:order).valid?
end
def test_update
post :update, :id => 1
assert_response :redirect
assert_redirected_to :action => 'show', :id => 1
end
def test_destroy
assert_not_nil Order.find(1)
post :destroy, :id => 1
assert_response :redirect
assert_redirected_to :action => 'list'
assert_raise(ActiveRecord::RecordNotFound) {
Order.find(1)
}
end
end

View File

@ -1,45 +0,0 @@
require 'test_helper'
class PagesControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:pages)
end
test "should get new" do
get :new
assert_response :success
end
test "should create page" do
assert_difference('Page.count') do
post :create, :page => { }
end
assert_redirected_to page_path(assigns(:page))
end
test "should show page" do
get :show, :id => pages(:one).id
assert_response :success
end
test "should get edit" do
get :edit, :id => pages(:one).id
assert_response :success
end
test "should update page" do
put :update, :id => pages(:one).id, :page => { }
assert_redirected_to page_path(assigns(:page))
end
test "should destroy page" do
assert_difference('Page.count', -1) do
delete :destroy, :id => pages(:one).id
end
assert_redirected_to pages_path
end
end

View File

@ -1,9 +0,0 @@
require 'test_helper'
class SessionsControllerTest < ActionController::TestCase
test "should get new" do
get :new
assert_response :success
end
end

View File

@ -1,45 +0,0 @@
require 'test_helper'
class StockTakingsControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:stock_takings)
end
test "should get new" do
get :new
assert_response :success
end
test "should create stock_taking" do
assert_difference('StockTaking.count') do
post :create, :stock_taking => { }
end
assert_redirected_to stock_taking_path(assigns(:stock_taking))
end
test "should show stock_taking" do
get :show, :id => stock_takings(:one).id
assert_response :success
end
test "should get edit" do
get :edit, :id => stock_takings(:one).id
assert_response :success
end
test "should update stock_taking" do
put :update, :id => stock_takings(:one).id, :stock_taking => { }
assert_redirected_to stock_taking_path(assigns(:stock_taking))
end
test "should destroy stock_taking" do
assert_difference('StockTaking.count', -1) do
delete :destroy, :id => stock_takings(:one).id
end
assert_redirected_to stock_takings_path
end
end

View File

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

View File

@ -1,18 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'tasks_controller'
# Re-raise errors caught by the controller.
class TasksController; def rescue_action(e) raise e end; end
class TasksControllerTest < Test::Unit::TestCase
def setup
@controller = TasksController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
# Replace this with your real tests.
def test_truth
assert true
end
end

View File

@ -1,9 +0,0 @@
require 'test_helper'
class UsersControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
end
end

View File

@ -1,45 +0,0 @@
require 'test_helper'
class WorkgroupsControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:workgroups)
end
test "should get new" do
get :new
assert_response :success
end
test "should create workgroup" do
assert_difference('Workgroup.count') do
post :create, :workgroup => { }
end
assert_redirected_to workgroup_path(assigns(:workgroup))
end
test "should show workgroup" do
get :show, :id => workgroups(:one).id
assert_response :success
end
test "should get edit" do
get :edit, :id => workgroups(:one).id
assert_response :success
end
test "should update workgroup" do
put :update, :id => workgroups(:one).id, :workgroup => { }
assert_redirected_to workgroup_path(assigns(:workgroup))
end
test "should destroy workgroup" do
assert_difference('Workgroup.count', -1) do
delete :destroy, :id => workgroups(:one).id
end
assert_redirected_to workgroups_path
end
end

View File

@ -1,9 +0,0 @@
require 'test_helper'
require 'rails/performance_test_help'
# Profiling results for each test method are written to tmp/performance.
class BrowsingTest < ActionDispatch::PerformanceTest
def test_homepage
get '/'
end
end

View File

@ -1,11 +0,0 @@
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

View File

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

View File

@ -1,10 +0,0 @@
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

@ -1,12 +0,0 @@
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

@ -1,11 +0,0 @@
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

@ -1,11 +0,0 @@
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

@ -1,14 +0,0 @@
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

@ -1,4 +0,0 @@
require 'test_helper'
class FeebackHelperTest < ActionView::TestCase
end

View File

@ -1,4 +0,0 @@
require 'test_helper'
class Finance::OrdergroupsHelperTest < ActionView::TestCase
end

View File

@ -1,4 +0,0 @@
require 'test_helper'
class OrderCommentsHelperTest < ActionView::TestCase
end

View File

@ -1,4 +0,0 @@
require 'test_helper'
class SessionsHelperTest < ActionView::TestCase
end

View File

@ -1,4 +0,0 @@
require 'test_helper'
class UsersHelperTest < ActionView::TestCase
end

View File

@ -1,11 +0,0 @@
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

@ -1,10 +0,0 @@
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

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

View File

@ -1,11 +0,0 @@
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

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

View File

@ -1,10 +0,0 @@
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

@ -1,11 +0,0 @@
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

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

View File

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

View File

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

View File

@ -1,13 +0,0 @@
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

View File

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