Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it should "after selling shares, the order is deleted" in {
- val asset = authorized { implicit auth =>
- val asset = getAssets(auth.userId).head
- createOffering(asset.id, 2, askPrice)
- asset
- }
- val asset2 = authorizedRandomUser { implicit auth =>
- val asset2 = getAssets(auth.userId).head
- val amount = 2
- createTransaction(TransactionOperation.Deposit, askPrice * amount)
- createOrder(asset.id, OrderType.Limit, OrderSide.Buy, askPrice, amount)
- waitForUpdates()
- createOrder(asset.id, OrderType.Limit, OrderSide.Sell, askPrice, amount)
- val userepoAccounts = getUserInfo(auth.userId)
- asset2
- authorizedRandomUser { implicit auth =>
- val amount = 2
- createTransaction(TransactionOperation.Deposit, askPrice * amount)
- createOrder(asset2.id, OrderType.Limit, OrderSide.Buy, askPrice, amount)
- waitForUpdates()
- val user = getUserInfo(auth.userId)
- user.cashAccounts.get.find(a => a.name == AccountName.Broker).get.bilan should be(0)
- }
- val user = getUserInfo(auth.userId)
- user.depoAccounts should be (Some(List()))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement