Sha256: d1939e64366568ea946eb0d5801e107ac67f59aa258ab97599767ccdd280dd43
Contents?: true
Size: 1.2 KB
Versions: 1
Compression:
Stored size: 1.2 KB
Contents
describe FlareUp::STLLoadErrorFetcher do describe '.fetch_errors' do let(:connection) { instance_double('FlareUp::Connection') } before do expect(connection).to receive(:execute). with('SELECT * FROM stl_load_errors ORDER BY query DESC, line_number, position LIMIT 3'). and_return([ { 'err_reason' => 'TEST_REASON', 'raw_field_value' => 'TEST_RAW_FIELD_VALUE', 'raw_line' => 'TEST_RAW_LINE', 'col_length' => '1', 'type' => 'TEST_TYPE', 'colname' => 'TEST_COLNAME', 'filename' => 'TEST_FILENAME', 'position' => '2', 'line_number' => '3', 'starttime' => '2014-08-11 06:06:59' } ]) end it 'should return the load errors' do expect(FlareUp::STLLoadErrorFetcher.fetch_errors(connection)).to eq( [ FlareUp::STLLoadError.new( 'TEST_REASON', 'TEST_RAW_FIELD_VALUE', 'TEST_RAW_LINE', 1, 'TEST_TYPE', 'TEST_COLNAME', 'TEST_FILENAME', 2, 3, Time.parse('2014-08-11 06:06:59 UTC') ) ] ) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flare-up-0.3 | spec/lib/flare_up/stl_load_error_fetcher_spec.rb |