spec/differential/calculator/group_spec.rb in differential-1.0.5 vs spec/differential/calculator/group_spec.rb in differential-1.0.6

- old
+ new

@@ -39,6 +39,17 @@ expected_ids = unsorted_ids.sort expect(actual_ids).to eq(expected_ids) end + + it 'should peek at data based on first item it finds' do + record = ::Differential::Parser::Record.new(id: '1', + group_id: group_id, + value: 1, + data: { name: 'Millie' }) + + group.add(record, ::Differential::Calculator::Side::A) + + expect(group.data_peek(:name)).to eq(record.data[:name]) + end end