require 'features_helper'

describe 'Provenance events' do
  let!(:chain) { create(:provenance_chain) }
  let!(:validator) { create(:provenance_validator_synced, chain: chain) }
  let!(:event) { create(:provenance_event, chainlike: chain, validatorlike: validator) }
  let!(:block) { create(:provenance_block, chain: chain) }

  it 'Visiting Provenance Events View as not signed in user' do
    visit "/provenance/chains/#{chain.slug}/events"

    expect(page).to have_content(chain.name)
    expect(page).to have_content('1-1 of 1 total event')
    expect(page).to have_content("Added to active set #{event.height}")
  end
end
