mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Add from/until sorting to balance API
This commit is contained in:
parent
27e441bc24
commit
7b4214def1
2 changed files with 8 additions and 14 deletions
|
@ -13,10 +13,6 @@ class ReppV1BalanceTest < ActionDispatch::IntegrationTest
|
|||
get '/repp/v1/accounts/balance', headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
puts response.body
|
||||
puts @registrar.registrar.cash_account.balance
|
||||
puts @registrar.registrar.cash_account.currency
|
||||
|
||||
assert_response :ok
|
||||
assert_equal 1000, json[:code]
|
||||
assert_equal 'Command completed successfully', json[:message]
|
||||
|
@ -28,7 +24,7 @@ class ReppV1BalanceTest < ActionDispatch::IntegrationTest
|
|||
started_from = "2020-01-01"
|
||||
end_to = DateTime.current.to_date.to_s(:db)
|
||||
|
||||
get "/repp/v1/accounts/balance?detailed=true&started_from=#{started_from}&end_to=#{end_to}", headers: @auth_headers
|
||||
get "/repp/v1/accounts/balance?detailed=true&from=#{started_from}&until=#{end_to}", headers: @auth_headers
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :ok
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue