Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blockscout/test/mix/tasks/backfill_test.exs

22 lines
412 B

defmodule Scrape.Backfill do
use Explorer.DataCase
alias Explorer.Block
alias Explorer.Repo
test "backfills previous blocks" do
insert(:block, %{number: 2})
use_cassette "backfill" do
Mix.Tasks.Backfill.run([])
last_block = Block
|> order_by(asc: :number)
|> limit(1)
|> Repo.all
|> List.first
assert last_block.number == 1
end
end
end