mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
- `runner 'Invoice.cancel_overdue_invoices'` in `schedule.rb` is changed to `rake 'invoices:cancel_overdue'`. - `invoices.payment_term` database column is removed and its value is hardcoded in UI. - `invoices.paid_at` is removed as unused - `invoices.due_date` column's type is now `date`. - `Invoice#invoice_items` renamed to `Invoice#items` and `Invoice` interface to get a list of items is unified. - Default date format in UI. - Default translations are used. - Tests improved. - Specs converted to tests and removed along with factories. - Database structure improved.
20 lines
No EOL
419 B
Ruby
20 lines
No EOL
419 B
Ruby
require 'test_helper'
|
|
|
|
class AdminAreaInvoicesTest < ApplicationSystemTestCase
|
|
setup do
|
|
sign_in users(:admin)
|
|
@invoice = invoices(:one)
|
|
end
|
|
|
|
def test_cancels_an_invoice
|
|
@invoice.account_activity = nil
|
|
assert @invoice.cancellable?
|
|
|
|
visit admin_invoice_url(@invoice)
|
|
click_on 'Cancel'
|
|
@invoice.reload
|
|
|
|
assert @invoice.cancelled?
|
|
assert_text 'Invoice has been cancelled'
|
|
end
|
|
end |