spec/mri/pg_interface_spec.rb in pod4-0.7.1 vs spec/mri/pg_interface_spec.rb in pod4-0.7.2
- old
+ new
@@ -217,10 +217,17 @@
expect{ interface.create(record) }.not_to raise_exception
id = interface.create(record)
expect( interface.read(id).to_h ).to include(record)
end
+ it 'shouldnt have a problem with strings containing special characters' do
+ record = {name: %Q|T'Challa""|, price: nil}
+ expect{ interface.create(record) }.not_to raise_exception
+ id = interface.create(record)
+ expect( interface.read(id).to_h ).to include(record)
+ end
+
end
##
describe '#read' do
@@ -347,9 +354,15 @@
end
it 'shouldnt have a problem with record values of nil' do
record = {name: 'Ranger', price: nil}
+ expect{ interface.update(id, record) }.not_to raise_exception
+ expect( interface.read(id).to_h ).to include(record)
+ end
+
+ it 'shouldnt have a problem with strings containing special characters' do
+ record = {name: %Q|T'Challa""|, price: nil}
expect{ interface.update(id, record) }.not_to raise_exception
expect( interface.read(id).to_h ).to include(record)
end
end