RSpec.describe BoaVista::Response::Layout::Layout249 do
  let(:line)     { File.read('./spec/fixtures/layout_249.txt') }

  let(:instance) { BoaVista::Line.prepare_for_read(line, described_class) }

  describe '#read' do
    subject { instance.read }

    its(:transaction)        { is_expected.to eq('T' * 8) }
    its(:query_online)       { is_expected.to eq('Q' * 1) }
    its(:name)               { is_expected.to eq('N' * 60) }
    its(:document)           { is_expected.to eq('30730866610') }
    its(:birthday_date)      { is_expected.to eq('25121982') }
    its(:mothers_name)       { is_expected.to eq('M' * 50) }
    its(:voter_registration) { is_expected.to eq('V' * 13) }
    its(:condition)          { is_expected.to eq('1') }
    its(:query_date)         { is_expected.to eq('D' * 8) }
    its(:query_time)         { is_expected.to eq('T' * 6) }
    its(:protocol)           { is_expected.to eq('P' * 20) }
  end
end
