Improve tests

- Remove unnecessary fixtures
- Remove unnecessary teardown steps
- Improve readability
This commit is contained in:
Artur Beljajev 2019-06-20 16:34:33 +03:00
parent 07b23ca57f
commit 8faa6d55ea
6 changed files with 35 additions and 70 deletions

View file

@ -4,11 +4,8 @@ class EveryPayTest < ActiveSupport::TestCase
def setup
super
@invoice = invoices(:for_payments_test)
invoice_item = invoice_items(:one)
@invoice.items << invoice_item
@invoice.items << invoice_item
@invoice = invoices(:one)
@invoice.update!(total: 12)
params = {
response:
@ -41,12 +38,6 @@ class EveryPayTest < ActiveSupport::TestCase
travel_to Time.zone.parse('2018-04-01 00:30:00 +0000')
end
def teardown
super
travel_back
end
def test_form_fields
expected_fields = {
api_username: 'api_user',