mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Merge remote-tracking branch 'origin/master' into 509-directo-to-gem
This commit is contained in:
commit
cd871ca829
45 changed files with 329 additions and 294 deletions
|
@ -36,22 +36,22 @@ class DepositTest < ActiveSupport::TestCase
|
|||
|
||||
def test_amount_is_converted_from_string
|
||||
@deposit.amount = "12.00"
|
||||
assert_equal(BigDecimal.new("12.00"), @deposit.amount)
|
||||
assert_equal(BigDecimal("12.00"), @deposit.amount)
|
||||
|
||||
@deposit.amount = "12,11"
|
||||
assert_equal(BigDecimal.new("12.11"), @deposit.amount)
|
||||
assert_equal(BigDecimal("12.11"), @deposit.amount)
|
||||
end
|
||||
|
||||
def test_amount_is_converted_from_float
|
||||
@deposit.amount = 12.0044
|
||||
assert_equal(BigDecimal.new("12.0044"), @deposit.amount)
|
||||
assert_equal(BigDecimal("12.0044"), @deposit.amount)
|
||||
|
||||
@deposit.amount = 12.0144
|
||||
assert_equal(BigDecimal.new("12.0144"), @deposit.amount)
|
||||
assert_equal(BigDecimal("12.0144"), @deposit.amount)
|
||||
end
|
||||
|
||||
def test_amount_is_converted_from_nil
|
||||
@deposit.amount = nil
|
||||
assert_equal(BigDecimal.new("0.00"), @deposit.amount)
|
||||
assert_equal(BigDecimal("0.00"), @deposit.amount)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,6 +13,8 @@ class AuctionDoubleTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
class DNS::DomainNameTest < ActiveSupport::TestCase
|
||||
fixtures 'whois/records'
|
||||
|
||||
def test_available_when_not_at_auction
|
||||
domain_name = DNS::DomainName.new('auction.test')
|
||||
auctions(:one).update!(domain: 'auction.test', status: Auction.statuses[:domain_registered])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue