mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Merge branch 'master' into registry-790
This commit is contained in:
commit
c48cdf68b6
16 changed files with 918 additions and 56 deletions
|
@ -29,11 +29,10 @@ class NewInvoiceTest < ApplicationSystemTestCase
|
|||
assert_text 'Pay invoice'
|
||||
end
|
||||
|
||||
# This test case should fail once issue #651 gets fixed
|
||||
def test_create_new_invoice_with_amount_0_goes_through
|
||||
def test_create_new_invoice_with_comma_in_number
|
||||
visit registrar_invoices_path
|
||||
click_link_or_button 'Add deposit'
|
||||
fill_in 'Amount', with: '0.00'
|
||||
fill_in 'Amount', with: '200,00'
|
||||
fill_in 'Description', with: 'My first invoice'
|
||||
|
||||
assert_difference 'Invoice.count', 1 do
|
||||
|
@ -42,7 +41,33 @@ class NewInvoiceTest < ApplicationSystemTestCase
|
|||
|
||||
assert_text 'Please pay the following invoice'
|
||||
assert_text 'Invoice no. 131050'
|
||||
assert_text 'Subtotal 0,00 €'
|
||||
assert_text 'Subtotal 200,00 €'
|
||||
assert_text 'Pay invoice'
|
||||
end
|
||||
|
||||
def test_create_new_invoice_fails_when_amount_is_0
|
||||
visit registrar_invoices_path
|
||||
click_link_or_button 'Add deposit'
|
||||
fill_in 'Amount', with: '0.00'
|
||||
fill_in 'Description', with: 'My first invoice'
|
||||
|
||||
assert_no_difference 'Invoice.count' do
|
||||
click_link_or_button 'Add'
|
||||
end
|
||||
|
||||
assert_text 'Amount is too small. Minimum deposit is 0.01 EUR'
|
||||
end
|
||||
|
||||
def test_create_new_invoice_fails_when_amount_is_negative
|
||||
visit registrar_invoices_path
|
||||
click_link_or_button 'Add deposit'
|
||||
fill_in 'Amount', with: '-120.00'
|
||||
fill_in 'Description', with: 'My first invoice'
|
||||
|
||||
assert_no_difference 'Invoice.count' do
|
||||
click_link_or_button 'Add'
|
||||
end
|
||||
|
||||
assert_text 'Amount is too small. Minimum deposit is 0.01 EUR'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue