Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fixed test cases

Shibu Mc936c938cfe8
diff --git a/test/controllers/transfers_controller_test.rb b/test/controllers/transfers_controller_test.rb
index 1da827e1e5..723a5d94e9 100644
--- a/test/controllers/transfers_controller_test.rb
+++ b/test/controllers/transfers_controller_test.rb
@@ -163,7 +163,7 @@ class TransfersControllerTest < ActionDispatch::IntegrationTest
}
end
- transfer = Transfer.last
+ transfer = Transfer.order(created_at: :desc).first
assert_equal 3, transfer.source_fee_amount
assert_equal 0, transfer.destination_fee_amount
# Outflow should be amount + source_fee = 100 + 3 = 103
@@ -185,7 +185,7 @@ class TransfersControllerTest < ActionDispatch::IntegrationTest
}
end
- transfer = Transfer.last
+ transfer = Transfer.order(created_at: :desc).first
assert_equal 0, transfer.source_fee_amount
assert_equal 3, transfer.destination_fee_amount
# Outflow should be amount + source_fee = 100 + 0 = 100
@@ -208,7 +208,7 @@ class TransfersControllerTest < ActionDispatch::IntegrationTest
}
end
- transfer = Transfer.last
+ transfer = Transfer.order(created_at: :desc).first
assert_equal 2, transfer.source_fee_amount
assert_equal 3, transfer.destination_fee_amount
# Outflow = 100 + 2 = 102