mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Merge branch 'replace-warden-helpers-with-devise' into registry-790
# Conflicts: # test/integration/admin/domains_test.rb
This commit is contained in:
commit
eddf39ea9b
51 changed files with 53 additions and 52 deletions
|
@ -5,7 +5,7 @@ class ContactVersionsTest < ActionDispatch::IntegrationTest
|
|||
super
|
||||
|
||||
create_contact_with_history
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
|
|
@ -5,7 +5,7 @@ class AdminContactsTest < ActionDispatch::IntegrationTest
|
|||
super
|
||||
|
||||
@contact = contacts(:william)
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def test_display_list
|
||||
|
|
|
@ -5,7 +5,7 @@ class DomainVersionsTest < ActionDispatch::IntegrationTest
|
|||
super
|
||||
|
||||
create_domain_with_history
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class AdminAreaDomainDetailsTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
@domain = domains(:shop)
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ class AdminAreaDomainForceDeleteTest < ActionDispatch::IntegrationTest
|
|||
include ActionMailer::TestHelper
|
||||
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
@domain = domains(:shop)
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class AdminDomainsTestTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
@domain = domains(:shop)
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class AdminAreaNewMailTemplateTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def test_new_mail_template_does_not_throw_template_error
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class AdminAreaDeleteRegistrarTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def test_can_be_deleted_when_not_in_use
|
||||
|
|
|
@ -4,7 +4,7 @@ class AdminAreaRegistrarDetailsTest < ActionDispatch::IntegrationTest
|
|||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
@registrar = registrars(:complete)
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class AdminAreaEditRegistrarTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
@registrar = registrars(:bestnames)
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class AdminAreaNewRegistrarTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:admin)
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def test_new_registrar_creation_with_required_params
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class RegistrantDomainsTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:registrant)
|
||||
sign_in users(:registrant)
|
||||
|
||||
Setting.days_to_keep_business_registry_cache = 1
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'test_helper'
|
|||
class RegistrantLayoutTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
super
|
||||
login_as(users(:registrant))
|
||||
sign_in(users(:registrant))
|
||||
|
||||
Setting.days_to_keep_business_registry_cache = 1
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class BalanceTopUpTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:api_bestnames)
|
||||
sign_in users(:api_bestnames)
|
||||
end
|
||||
|
||||
def test_creates_new_invoice
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class RegistrarAreaBulkTransferTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:api_goodnames)
|
||||
sign_in users(:api_goodnames)
|
||||
end
|
||||
|
||||
def test_transfer_multiple_domains_in_bulk
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class RegistrarAreaNameserverBulkChangeTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:api_goodnames)
|
||||
sign_in users(:api_goodnames)
|
||||
end
|
||||
|
||||
def test_replaces_current_registrar_nameservers
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class RegistrarAreaTechContactBulkChangeTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
login_as users(:api_bestnames)
|
||||
sign_in users(:api_bestnames)
|
||||
end
|
||||
|
||||
def test_replace_domain_contacts_of_current_registrar
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'test_helper'
|
|||
|
||||
class RegistrarDomainsTest < ActionDispatch::IntegrationTest
|
||||
def test_downloads_domain_list_as_csv
|
||||
login_as users(:api_bestnames)
|
||||
sign_in users(:api_bestnames)
|
||||
travel_to Time.zone.parse('2010-07-05 10:30')
|
||||
|
||||
expected_csv = <<-CSV.strip_heredoc
|
||||
|
|
|
@ -6,7 +6,7 @@ class ListInvoicesTest < ActionDispatch::IntegrationTest
|
|||
|
||||
@user = users(:api_bestnames)
|
||||
@registrar_invoices = @user.registrar.invoices
|
||||
login_as @user
|
||||
sign_in @user
|
||||
end
|
||||
|
||||
def test_show_balance
|
||||
|
|
|
@ -7,7 +7,7 @@ class NewInvoicePaymentTest < ActionDispatch::IntegrationTest
|
|||
@original_vat_prc = Setting.registry_vat_prc
|
||||
Setting.registry_vat_prc = 0.2
|
||||
@user = users(:api_bestnames)
|
||||
login_as @user
|
||||
sign_in @user
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
|
|
@ -5,7 +5,7 @@ class NewInvoiceTest < ActionDispatch::IntegrationTest
|
|||
super
|
||||
|
||||
@user = users(:api_bestnames)
|
||||
login_as @user
|
||||
sign_in @user
|
||||
end
|
||||
|
||||
def test_show_balance
|
||||
|
|
|
@ -5,7 +5,7 @@ class PaymentCallbackTest < ActionDispatch::IntegrationTest
|
|||
super
|
||||
|
||||
@user = users(:api_bestnames)
|
||||
login_as @user
|
||||
sign_in @user
|
||||
end
|
||||
|
||||
def create_invoice_with_items
|
||||
|
|
|
@ -5,7 +5,7 @@ class PaymentReturnTest < ActionDispatch::IntegrationTest
|
|||
super
|
||||
|
||||
@user = users(:api_bestnames)
|
||||
login_as @user
|
||||
sign_in @user
|
||||
end
|
||||
|
||||
def create_invoice_with_items
|
||||
|
|
|
@ -28,15 +28,14 @@ class ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
class ActionDispatch::IntegrationTest
|
||||
include Warden::Test::Helpers
|
||||
include Capybara::DSL
|
||||
include Capybara::Minitest::Assertions
|
||||
include AbstractController::Translation
|
||||
include Devise::Test::IntegrationHelpers
|
||||
|
||||
teardown do
|
||||
Warden.test_reset!
|
||||
WebMock.reset!
|
||||
Capybara.reset_sessions!
|
||||
Capybara.use_default_driver
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue