@@ -745,10 +745,10 @@ class TradeOrderTest < ActiveSupport::TestCase
745
745
assert_equal BigDecimal ( "999250.0" ) , trader2 . balance ( :lrusd ) , "Delta #{ trader2 . balance ( :lrusd ) - BigDecimal ( "999250.0" ) } "
746
746
end
747
747
748
- test "a market order should remains active" do
748
+ test "a market order should remain active" do
749
749
t1 = Factory ( :user )
750
750
751
- add_money ( t1 , BigDecimal ( " 1000.0" ) , :btc )
751
+ add_money ( t1 , 1000.0 , :btc )
752
752
753
753
market = Factory ( :market_order ,
754
754
:category => "sell" ,
@@ -768,7 +768,7 @@ class TradeOrderTest < ActiveSupport::TestCase
768
768
assert market . active?
769
769
assert limit . active?
770
770
771
- add_money ( t1 , BigDecimal ( " -1000.0" ) , :btc )
771
+ add_money ( t1 , -1000.0 , :btc )
772
772
773
773
assert !limit . reload . active?
774
774
assert market . reload . active?
@@ -882,7 +882,7 @@ class TradeOrderTest < ActiveSupport::TestCase
882
882
:commission_rate => BigDecimal ( "0.1" ) )
883
883
884
884
t2 = Factory ( :user ,
885
- :commission_rate => BigDecimal ( "0.1 " ) )
885
+ :commission_rate => BigDecimal ( "0.2 " ) )
886
886
887
887
add_money ( t1 , 1000 , :btc )
888
888
add_money ( t2 , 1000 , :eur )
@@ -905,7 +905,8 @@ class TradeOrderTest < ActiveSupport::TestCase
905
905
t . execute!
906
906
907
907
assert_equal t1 . balance ( :eur ) , BigDecimal ( "900" )
908
- assert_equal Account . storage_account_for ( :BTC_fees ) . balance ( :btc ) , 100
908
+ assert_equal Account . storage_account_for ( :fees ) . balance ( :eur ) , 100
909
+ assert_equal Account . storage_account_for ( :fees ) . balance ( :btc ) , 200
909
910
end
910
911
911
912
test "should not be able to create a very small market order" do
0 commit comments