mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
parent
bb108efedd
commit
fa52001be6
141 changed files with 1388 additions and 1664 deletions
|
@ -10,19 +10,19 @@ class ApiV1AuctionListTest < ActionDispatch::IntegrationTest
|
|||
domain: 'auction.test',
|
||||
status: Auction.statuses[:started])
|
||||
|
||||
get api_v1_auctions_path, nil, 'Content-Type' => Mime::JSON.to_s
|
||||
get api_v1_auctions_path, as: :json
|
||||
|
||||
assert_response :ok
|
||||
assert_equal ([{ 'id' => '1b3ee442-e8fe-4922-9492-8fcb9dccc69c',
|
||||
'domain' => 'auction.test',
|
||||
'status' => Auction.statuses[:started] }]), ActiveSupport::JSON
|
||||
.decode(response.body)
|
||||
.decode(response.body)
|
||||
end
|
||||
|
||||
def test_does_not_return_finished_auctions
|
||||
@auction.update!(domain: 'auction.test', status: Auction.statuses[:awaiting_payment])
|
||||
|
||||
get api_v1_auctions_path, nil, 'Content-Type' => Mime::JSON.to_s
|
||||
get api_v1_auctions_path, as: :json
|
||||
|
||||
assert_response :ok
|
||||
assert_empty ActiveSupport::JSON.decode(response.body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue