mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Check for domain dispute on create
This commit is contained in:
parent
928f96691c
commit
1dc2cf8e12
5 changed files with 41 additions and 4 deletions
|
@ -30,6 +30,22 @@ class AdminDisputesSystemTest < ApplicationSystemTestCase
|
|||
assert_text 'disputed.test'
|
||||
end
|
||||
|
||||
def test_throws_error_if_starts_at_is_past
|
||||
assert_nil Dispute.active.find_by(domain_name: 'disputed.test')
|
||||
|
||||
visit admin_disputes_path
|
||||
click_on 'New domain dispute'
|
||||
|
||||
fill_in 'Domain name', with: 'disputed.test'
|
||||
fill_in 'Password', with: '1234'
|
||||
fill_in 'Starts at', with: (Time.zone.today - 2.day).to_s
|
||||
fill_in 'Comment', with: 'Sample comment'
|
||||
click_on 'Save'
|
||||
|
||||
assert_text 'Dispute was successfully created.'
|
||||
assert_text 'disputed.test'
|
||||
end
|
||||
|
||||
def test_updates_dispute
|
||||
assert_not_equal Time.zone.today, @dispute.starts_at
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue