|
|
|
@ -13,18 +13,6 @@ defmodule BlockScoutWeb.LayoutViewTest do |
|
|
|
|
end) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe "network_icon_partial/0" do |
|
|
|
|
test "use the enviroment icon when it's configured" do |
|
|
|
|
Application.put_env(:block_scout_web, BlockScoutWeb.Chain, network_icon: "custom_icon") |
|
|
|
|
|
|
|
|
|
assert LayoutView.network_icon_partial() == "custom_icon" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
test "use the default icon when there is no env configured for it" do |
|
|
|
|
assert LayoutView.network_icon_partial() == "_network_icon.html" |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe "logo/0" do |
|
|
|
|
test "use the enviroment logo when it's configured" do |
|
|
|
|
Application.put_env(:block_scout_web, BlockScoutWeb.Chain, logo: "custom/logo.png") |
|
|
|
@ -45,7 +33,7 @@ defmodule BlockScoutWeb.LayoutViewTest do |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
test "use the default subnetwork title when there is no env configured for it" do |
|
|
|
|
assert LayoutView.subnetwork_title() == "Sokol Testnet" |
|
|
|
|
assert LayoutView.subnetwork_title() == "POA Sokol" |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -119,11 +107,6 @@ defmodule BlockScoutWeb.LayoutViewTest do |
|
|
|
|
url: "https://blockscout.com/rsk/mainnet", |
|
|
|
|
other?: true |
|
|
|
|
}, |
|
|
|
|
%{ |
|
|
|
|
title: "POA Sokol", |
|
|
|
|
url: "https://blockscout.com/poa/sokol", |
|
|
|
|
test_net?: true |
|
|
|
|
}, |
|
|
|
|
%{ |
|
|
|
|
title: "LUKSO L14 testnet", |
|
|
|
|
url: "https://blockscout.com/lukso/l14", |
|
|
|
@ -157,11 +140,6 @@ defmodule BlockScoutWeb.LayoutViewTest do |
|
|
|
|
Application.put_env(:block_scout_web, :other_networks, @supported_chains_pattern) |
|
|
|
|
|
|
|
|
|
assert LayoutView.test_nets(LayoutView.other_networks()) == [ |
|
|
|
|
%{ |
|
|
|
|
title: "POA Sokol", |
|
|
|
|
url: "https://blockscout.com/poa/sokol", |
|
|
|
|
test_net?: true |
|
|
|
|
}, |
|
|
|
|
%{ |
|
|
|
|
title: "LUKSO L14 testnet", |
|
|
|
|
url: "https://blockscout.com/lukso/l14", |
|
|
|
@ -185,11 +163,6 @@ defmodule BlockScoutWeb.LayoutViewTest do |
|
|
|
|
title: "RSK Mainnet", |
|
|
|
|
url: "https://blockscout.com/rsk/mainnet", |
|
|
|
|
other?: true |
|
|
|
|
}, |
|
|
|
|
%{ |
|
|
|
|
title: "POA Sokol", |
|
|
|
|
url: "https://blockscout.com/poa/sokol", |
|
|
|
|
test_net?: true |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
end |
|
|
|
|