mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
parent
07e40d61dd
commit
34f1e2be2f
2 changed files with 13 additions and 0 deletions
|
@ -3,6 +3,7 @@ require 'test_helper'
|
|||
class APIDomainTransfersTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
@domain = domains(:shop)
|
||||
Setting.transfer_wait_time = 0 # Auto-approval
|
||||
end
|
||||
|
||||
def test_returns_domain_transfers
|
||||
|
@ -14,6 +15,12 @@ class APIDomainTransfersTest < ActionDispatch::IntegrationTest
|
|||
JSON.parse(response.body, symbolize_names: true)
|
||||
end
|
||||
|
||||
def test_creates_new_domain_transfer
|
||||
assert_difference -> { @domain.domain_transfers.size } do
|
||||
post '/repp/v1/domain_transfers', request_params, { 'HTTP_AUTHORIZATION' => http_auth_key }
|
||||
end
|
||||
end
|
||||
|
||||
def test_approves_automatically_if_auto_approval_is_enabled
|
||||
post '/repp/v1/domain_transfers', request_params, { 'HTTP_AUTHORIZATION' => http_auth_key }
|
||||
assert @domain.domain_transfers(true).last.approved?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue