Current section
Files
Jump to
Current section
Files
lib/perspective/reactor/state/tests/backup_state_test.exs
defmodule Perspective.Reactor.BackupState.Test do
use ExUnit.Case, async: true
use Perspective.BootAppPerTest
test "reactor state can be saved and reloaded" do
state = Perspective.Reactor.State.from(last_event_processed: "event/abc-123", data: "abc")
Perspective.Reactor.BackupState.save_state(Perspective.Reactor.BackupState, state)
loaded_state = Perspective.Reactor.BackupState.load_state(Perspective.Reactor.BackupState)
assert loaded_state == state
end
end