fix remaining tests

pull/2468/head
Ayrat Badykov 5 years ago
parent a2783579ce
commit f48ef86227
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 2
      apps/block_scout_web/test/block_scout_web/features/viewing_addresses_test.exs
  2. 8
      apps/block_scout_web/test/block_scout_web/views/address_coin_balance_view_test.exs
  3. 7
      apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs

@ -73,7 +73,7 @@ defmodule BlockScoutWeb.ViewingAddressesTest do
session
|> AddressPage.visit_page(address)
|> assert_text(AddressPage.balance(), "0.0000000000000005 POA")
|> assert_text(AddressPage.balance(), "0.0000000000000005 Ether")
end
describe "viewing contract creator" do

@ -8,13 +8,13 @@ defmodule BlockScoutWeb.AddressCoinBalanceViewTest do
test "format the wei value in ether" do
wei = Wei.from(Decimal.new(1_340_000_000), :gwei)
assert AddressCoinBalanceView.format(wei) == "1.34 POA"
assert AddressCoinBalanceView.format(wei) == "1.34 Ether"
end
test "format negative values" do
wei = Wei.from(Decimal.new(-1_340_000_000), :gwei)
assert AddressCoinBalanceView.format(wei) == "-1.34 POA"
assert AddressCoinBalanceView.format(wei) == "-1.34 Ether"
end
end
@ -50,13 +50,13 @@ defmodule BlockScoutWeb.AddressCoinBalanceViewTest do
test "format positive values" do
value = Decimal.new(1_340_000_000_000_000_000)
assert AddressCoinBalanceView.format_delta(value) == "1.34 POA"
assert AddressCoinBalanceView.format_delta(value) == "1.34 Ether"
end
test "format negative values" do
value = Decimal.new(-1_340_000_000_000_000_000)
assert AddressCoinBalanceView.format_delta(value) == "1.34 POA"
assert AddressCoinBalanceView.format_delta(value) == "1.34 Ether"
end
end
end

@ -136,7 +136,7 @@ defmodule BlockScoutWeb.TransactionViewTest do
gas_used: nil
)
expected_value = "Max of 0.009 POA"
expected_value = "Max of 0.009 Ether"
assert expected_value == TransactionView.formatted_fee(transaction, denomination: :ether)
end
@ -144,12 +144,9 @@ defmodule BlockScoutWeb.TransactionViewTest do
{:ok, gas_price} = Wei.cast(3_000_000_000)
transaction = build(:transaction, gas_price: gas_price, gas_used: Decimal.from_float(1_034_234.0))
expected_value = "0.003102702 POA"
expected_value = "0.003102702 Ether"
assert expected_value == TransactionView.formatted_fee(transaction, denomination: :ether)
end
test "with fee but no available exchange_rate" do
end
end
describe "formatted_status/1" do

Loading…
Cancel
Save