mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 21:46:24 +02:00
Updated tests after renaming REPP API accounts controller
This commit is contained in:
parent
a44ac5359d
commit
1b14a9d012
5 changed files with 16 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ReppV1AccountActivitiesListTest < ActionDispatch::IntegrationTest
|
||||
class ReppV1AccountsActivitiesListTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
@user = users(:api_bestnames)
|
||||
token = Base64.encode64("#{@user.username}:#{@user.plain_text_password}")
|
||||
|
@ -10,7 +10,7 @@ class ReppV1AccountActivitiesListTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_returns_account_activities
|
||||
get repp_v1_account_path, headers: @auth_headers
|
||||
get repp_v1_accounts_path, headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
||||
|
@ -22,7 +22,7 @@ class ReppV1AccountActivitiesListTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_respects_limit
|
||||
get repp_v1_account_path(limit: 1), headers: @auth_headers
|
||||
get repp_v1_accounts_path(limit: 1), headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
||||
|
@ -32,7 +32,7 @@ class ReppV1AccountActivitiesListTest < ActionDispatch::IntegrationTest
|
|||
|
||||
def test_respects_offset
|
||||
offset = 1
|
||||
get repp_v1_account_path(offset: offset), headers: @auth_headers
|
||||
get repp_v1_accounts_path(offset: offset), headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
||||
|
@ -44,7 +44,7 @@ class ReppV1AccountActivitiesListTest < ActionDispatch::IntegrationTest
|
|||
search_params = {
|
||||
description_matches: '%renew%',
|
||||
}
|
||||
get repp_v1_account_path(q: search_params), headers: @auth_headers
|
||||
get repp_v1_accounts_path(q: search_params), headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
||||
|
@ -58,7 +58,7 @@ class ReppV1AccountActivitiesListTest < ActionDispatch::IntegrationTest
|
|||
sort_params = {
|
||||
s: 'activity_type asc',
|
||||
}
|
||||
get repp_v1_account_path(q: sort_params), headers: @auth_headers
|
||||
get repp_v1_accounts_path(q: sort_params), headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
|
@ -13,7 +13,7 @@ class ReppV1BalanceTest < ActionDispatch::IntegrationTest
|
|||
|
||||
|
||||
def test_can_query_balance
|
||||
get '/repp/v1/account/balance', headers: @auth_headers
|
||||
get '/repp/v1/accounts/balance', headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
||||
|
@ -30,7 +30,7 @@ class ReppV1BalanceTest < ActionDispatch::IntegrationTest
|
|||
started_from = "2010-07-05"
|
||||
end_to = DateTime.current.to_date.to_s(:db)
|
||||
|
||||
get "/repp/v1/account/balance?detailed=true", headers: @auth_headers
|
||||
get "/repp/v1/accounts/balance?detailed=true", headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ReppV1AccountDetailsTest < ActionDispatch::IntegrationTest
|
||||
class ReppV1AccountsDetailsTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
@user = users(:api_bestnames)
|
||||
token = Base64.encode64("#{@user.username}:#{@user.plain_text_password}")
|
||||
|
@ -10,7 +10,7 @@ class ReppV1AccountDetailsTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_returns_account_details
|
||||
get '/repp/v1/account/details', headers: @auth_headers
|
||||
get '/repp/v1/accounts/details', headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ReppV1AccountUpdateAutoReloadBalanceTest < ActionDispatch::IntegrationTest
|
||||
class ReppV1AccountsUpdateAutoReloadBalanceTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
@user = users(:api_bestnames)
|
||||
token = Base64.encode64("#{@user.username}:#{@user.plain_text_password}")
|
||||
|
@ -21,7 +21,7 @@ class ReppV1AccountUpdateAutoReloadBalanceTest < ActionDispatch::IntegrationTest
|
|||
|
||||
assert_nil @user.registrar.settings['balance_auto_reload']
|
||||
|
||||
post '/repp/v1/account/update_auto_reload_balance', headers: @auth_headers,
|
||||
post '/repp/v1/accounts/update_auto_reload_balance', headers: @auth_headers,
|
||||
params: request_body
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
assert_response :ok
|
||||
|
@ -44,7 +44,7 @@ class ReppV1AccountUpdateAutoReloadBalanceTest < ActionDispatch::IntegrationTest
|
|||
}
|
||||
Setting.minimum_deposit = min_deposit
|
||||
|
||||
post '/repp/v1/account/update_auto_reload_balance', headers: @auth_headers,
|
||||
post '/repp/v1/accounts/update_auto_reload_balance', headers: @auth_headers,
|
||||
params: request_body
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
|
@ -55,7 +55,7 @@ class ReppV1AccountUpdateAutoReloadBalanceTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def test_disables_auto_reload_balance
|
||||
get '/repp/v1/account/disable_auto_reload_balance', headers: @auth_headers
|
||||
get '/repp/v1/accounts/disable_auto_reload_balance', headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ReppV1AccountUpdateDetailsTest < ActionDispatch::IntegrationTest
|
||||
class ReppV1AccountsUpdateDetailsTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
@user = users(:api_bestnames)
|
||||
token = Base64.encode64("#{@user.username}:#{@user.plain_text_password}")
|
||||
|
@ -17,7 +17,7 @@ class ReppV1AccountUpdateDetailsTest < ActionDispatch::IntegrationTest
|
|||
},
|
||||
}
|
||||
|
||||
put '/repp/v1/account', headers: @auth_headers, params: request_body
|
||||
put '/repp/v1/accounts', headers: @auth_headers, params: request_body
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
Loading…
Add table
Add a link
Reference in a new issue