mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Cleanup setup/teardown methods
This commit is contained in:
parent
841a069ca4
commit
b578cdcfa8
7 changed files with 22 additions and 7 deletions
|
@ -1,7 +1,9 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class ListInvoicesTest < ActionDispatch::IntegrationTest
|
class ListInvoicesTest < ActionDispatch::IntegrationTest
|
||||||
setup do
|
def setup
|
||||||
|
super
|
||||||
|
|
||||||
@user = users(:api_bestnames)
|
@user = users(:api_bestnames)
|
||||||
@registrar_invoices = @user.registrar.invoices
|
@registrar_invoices = @user.registrar.invoices
|
||||||
login_as @user
|
login_as @user
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class NewInvoicePaymentTest < ActionDispatch::IntegrationTest
|
class NewInvoicePaymentTest < ActionDispatch::IntegrationTest
|
||||||
setup do
|
def setup
|
||||||
|
super
|
||||||
|
|
||||||
@user = users(:api_bestnames)
|
@user = users(:api_bestnames)
|
||||||
login_as @user
|
login_as @user
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class NewInvoiceTest < ActionDispatch::IntegrationTest
|
class NewInvoiceTest < ActionDispatch::IntegrationTest
|
||||||
setup do
|
def setup
|
||||||
|
super
|
||||||
|
|
||||||
@user = users(:api_bestnames)
|
@user = users(:api_bestnames)
|
||||||
login_as @user
|
login_as @user
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class PaymentCallbackTest < ActionDispatch::IntegrationTest
|
class PaymentCallbackTest < ActionDispatch::IntegrationTest
|
||||||
setup do
|
def setup
|
||||||
|
super
|
||||||
|
|
||||||
@user = users(:api_bestnames)
|
@user = users(:api_bestnames)
|
||||||
login_as @user
|
login_as @user
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class PaymentReturnTest < ActionDispatch::IntegrationTest
|
class PaymentReturnTest < ActionDispatch::IntegrationTest
|
||||||
setup do
|
def setup
|
||||||
|
super
|
||||||
|
|
||||||
@user = users(:api_bestnames)
|
@user = users(:api_bestnames)
|
||||||
login_as @user
|
login_as @user
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,6 +21,7 @@ class BankLinkTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
super
|
super
|
||||||
|
|
||||||
travel_back
|
travel_back
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class EveryPayTest < ActiveSupport::TestCase
|
class EveryPayTest < ActiveSupport::TestCase
|
||||||
setup do
|
def setup
|
||||||
|
super
|
||||||
|
|
||||||
@invoice = invoices(:for_payments_test)
|
@invoice = invoices(:for_payments_test)
|
||||||
invoice_item = invoice_items(:one)
|
invoice_item = invoice_items(:one)
|
||||||
|
|
||||||
|
@ -40,7 +42,9 @@ class EveryPayTest < ActiveSupport::TestCase
|
||||||
travel_to Time.at(1522542600)
|
travel_to Time.at(1522542600)
|
||||||
end
|
end
|
||||||
|
|
||||||
teardown do
|
def teardown
|
||||||
|
super
|
||||||
|
|
||||||
travel_back
|
travel_back
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue