Commit be67547960630cc371773e63385ffe975dc743e1
1 parent
fb292e9d
Exists in
staging
and in
42 other branches
Remove crappy setup code in plugin functional tests
Showing
6 changed files
with
0 additions
and
31 deletions
Show diff stats
plugins/bsc/test/unit/bsc_plugin/bsc_test.rb
| 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' |
| 2 | -require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | ||
| 3 | -require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' | ||
| 4 | 2 | ||
| 5 | class BscPlugin::BscTest < ActiveSupport::TestCase | 3 | class BscPlugin::BscTest < ActiveSupport::TestCase |
| 6 | VALID_CNPJ = '94.132.024/0001-48' | 4 | VALID_CNPJ = '94.132.024/0001-48' |
plugins/bsc/test/unit/bsc_plugin_test.rb
| 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
| 2 | -require File.dirname(__FILE__) + '/../../../../app/models/uploaded_file' | ||
| 3 | -require File.dirname(__FILE__) + '/../../lib/ext/enterprise' | ||
| 4 | 2 | ||
| 5 | class BscPluginTest < ActiveSupport::TestCase | 3 | class BscPluginTest < ActiveSupport::TestCase |
| 6 | 4 |
plugins/bsc/test/unit/ext/enterprise_test.rb
| 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' |
| 2 | -require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | ||
| 3 | -require File.dirname(__FILE__) + '/../../../../../app/models/enterprise' | ||
| 4 | -require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' | ||
| 5 | 2 | ||
| 6 | class EnterpriseTest < ActiveSupport::TestCase | 3 | class EnterpriseTest < ActiveSupport::TestCase |
| 7 | VALID_CNPJ = '94.132.024/0001-48' | 4 | VALID_CNPJ = '94.132.024/0001-48' |
plugins/send_email/test/functional/send_email_plugin_admin_controller_test.rb
| 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
| 2 | -require File.dirname(__FILE__) + '/../../controllers/send_email_plugin_admin_controller' | ||
| 3 | - | ||
| 4 | -# Re-raise errors caught by the controller. | ||
| 5 | -class SendEmailPluginAdminController; def rescue_action(e) raise e end; end | ||
| 6 | 2 | ||
| 7 | class SendEmailPluginAdminControllerTest < ActionController::TestCase | 3 | class SendEmailPluginAdminControllerTest < ActionController::TestCase |
| 8 | 4 | ||
| 9 | def setup | 5 | def setup |
| 10 | - @controller = SendEmailPluginAdminController.new | ||
| 11 | - @request = ActionController::TestRequest.new | ||
| 12 | - @response = ActionController::TestResponse.new | ||
| 13 | @admin = create_user('adminplug').person | 6 | @admin = create_user('adminplug').person |
| 14 | @environment = @admin.environment | 7 | @environment = @admin.environment |
| 15 | @environment.add_admin(@admin) | 8 | @environment.add_admin(@admin) |
plugins/send_email/test/functional/send_email_plugin_base_controller_test.rb
| 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
| 2 | -require File.dirname(__FILE__) + '/../../controllers/send_email_plugin_profile_controller' | ||
| 3 | - | ||
| 4 | -# Re-raise errors caught by the controller. | ||
| 5 | -class SendEmailPluginProfileController; def rescue_action(e) raise e end; end | ||
| 6 | 2 | ||
| 7 | def run_common_tests | 3 | def run_common_tests |
| 8 | should 'not deliver emails via GET requests' do | 4 | should 'not deliver emails via GET requests' do |
| @@ -53,9 +49,6 @@ end | @@ -53,9 +49,6 @@ end | ||
| 53 | 49 | ||
| 54 | class SendEmailPluginProfileControllerTest < ActionController::TestCase | 50 | class SendEmailPluginProfileControllerTest < ActionController::TestCase |
| 55 | def setup | 51 | def setup |
| 56 | - @controller = SendEmailPluginProfileController.new | ||
| 57 | - @request = ActionController::TestRequest.new | ||
| 58 | - @response = ActionController::TestResponse.new | ||
| 59 | ActionMailer::Base.delivery_method = :test | 52 | ActionMailer::Base.delivery_method = :test |
| 60 | ActionMailer::Base.perform_deliveries = true | 53 | ActionMailer::Base.perform_deliveries = true |
| 61 | ActionMailer::Base.deliveries = [] | 54 | ActionMailer::Base.deliveries = [] |
| @@ -68,9 +61,6 @@ end | @@ -68,9 +61,6 @@ end | ||
| 68 | 61 | ||
| 69 | class SendEmailPluginEnvironmentControllerTest < ActionController::TestCase | 62 | class SendEmailPluginEnvironmentControllerTest < ActionController::TestCase |
| 70 | def setup | 63 | def setup |
| 71 | - @controller = SendEmailPluginEnvironmentController.new | ||
| 72 | - @request = ActionController::TestRequest.new | ||
| 73 | - @response = ActionController::TestResponse.new | ||
| 74 | ActionMailer::Base.delivery_method = :test | 64 | ActionMailer::Base.delivery_method = :test |
| 75 | ActionMailer::Base.perform_deliveries = true | 65 | ActionMailer::Base.perform_deliveries = true |
| 76 | ActionMailer::Base.deliveries = [] | 66 | ActionMailer::Base.deliveries = [] |
plugins/shopping_cart/test/functional/shopping_cart_plugin_myprofile_controller_test.rb
| 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
| 2 | -require File.dirname(__FILE__) + '/../../controllers/shopping_cart_plugin_myprofile_controller' | ||
| 3 | - | ||
| 4 | -# Re-raise errors caught by the controller. | ||
| 5 | -class ShoppingCartPluginMyprofileController; def rescue_action(e) raise e end; end | ||
| 6 | 2 | ||
| 7 | class ShoppingCartPluginMyprofileControllerTest < ActionController::TestCase | 3 | class ShoppingCartPluginMyprofileControllerTest < ActionController::TestCase |
| 8 | 4 | ||
| 9 | TIME_FORMAT = '%Y-%m-%d' | 5 | TIME_FORMAT = '%Y-%m-%d' |
| 10 | 6 | ||
| 11 | def setup | 7 | def setup |
| 12 | - @controller = ShoppingCartPluginMyprofileController.new | ||
| 13 | - @request = ActionController::TestRequest.new | ||
| 14 | - @response = ActionController::TestResponse.new | ||
| 15 | @enterprise = fast_create(Enterprise) | 8 | @enterprise = fast_create(Enterprise) |
| 16 | @admin = create_user('admin').person | 9 | @admin = create_user('admin').person |
| 17 | @enterprise.add_admin(@admin) | 10 | @enterprise.add_admin(@admin) |