mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Use setup/teardown blocks instead of methods
This commit is contained in:
parent
b1e0371188
commit
f8eda810f9
29 changed files with 29 additions and 29 deletions
|
@ -3,7 +3,7 @@ require 'test_helper'
|
|||
class AdminAreaDomainForceDeleteTest < ActionDispatch::IntegrationTest
|
||||
include ActionMailer::TestHelper
|
||||
|
||||
def setup
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
@domain = domains(:shop)
|
||||
ActionMailer::Base.deliveries.clear
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminDomainsTestTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminAreaDeleteRegistrarTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminAreaEditRegistrarTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
@registrar = registrars(:bestnames)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminAreaNewRegistrarTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'test_helper'
|
|||
class ShowRegistrarTest < ActionDispatch::IntegrationTest
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
def setup
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
@registrar = registrars(:bestnames)
|
||||
visit admin_registrar_path(@registrar)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class APIDomainTransfersTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@new_registrar = registrars(:goodnames)
|
||||
Setting.transfer_wait_time = 0 # Auto-approval
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppDomainCreateTransferCodeTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'test_helper'
|
|||
class EppDomainRenewTest < ActionDispatch::IntegrationTest
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
setup do
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppDomainTransferRequestTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@new_registrar = registrars(:goodnames)
|
||||
Setting.transfer_wait_time = 0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppLoginSessionLimitTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
EppSession.delete_all
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrantDomainsTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
login_as users(:registrant)
|
||||
|
||||
Setting.days_to_keep_business_registry_cache = 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrarDomainTransfersTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
WebMock.reset!
|
||||
login_as users(:api_goodnames)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrarNameserverReplacementTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
setup do
|
||||
WebMock.reset!
|
||||
login_as users(:api_goodnames)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ContactTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@contact = contacts(:john)
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class ContactIdenticalTest < ActiveSupport::TestCase
|
|||
org_name
|
||||
]
|
||||
|
||||
def setup
|
||||
setup do
|
||||
@contact = contacts(:william)
|
||||
@identical = contacts(:identical_to_william)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ContactPostalAddressTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@contact = contacts(:john)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ContactTransferTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@contact = contacts(:john)
|
||||
@new_registrar = registrars(:goodnames)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class DomainTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class DomainTransferableTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@new_registrar = registrars(:goodnames)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class DomainTransferTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@domain_transfer = domain_transfers(:shop)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppSessionTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@epp_session = epp_sessions(:api_bestnames)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class MessageTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@message = messages(:greeting)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class NameserverGlueRecordTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@nameserver = nameservers(:shop_ns1)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class NameserverTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@nameserver = nameservers(:shop_ns1)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrarCodeTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@registrar = registrars(:bestnames).dup
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class DeleteRegistrarTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@registrar = registrars(:not_in_use)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrarTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
setup do
|
||||
@registrar = registrars(:bestnames)
|
||||
end
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class ActionDispatch::IntegrationTest
|
|||
include Capybara::Minitest::Assertions
|
||||
include AbstractController::Translation
|
||||
|
||||
def teardown
|
||||
teardown do
|
||||
Warden.test_reset!
|
||||
Capybara.reset_sessions!
|
||||
Capybara.use_default_driver
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue