demarches-normaliennes/spec/models/logic_spec.rb

13 lines
377 B
Ruby
Raw Normal View History

2022-06-09 11:48:30 +02:00
describe Logic do
include Logic
it 'serializes deserializes' do
expect(Logic.from_h(constant(1).to_h)).to eq(constant(1))
expect(Logic.from_json(constant(1).to_json)).to eq(constant(1))
2022-06-09 11:54:29 +02:00
expect(Logic.from_h(empty.to_h)).to eq(empty)
2022-06-09 12:14:08 +02:00
expect(Logic.from_h(greater_than(constant(1), constant(2)).to_h)).to eq(greater_than(constant(1), constant(2)))
2022-06-09 11:48:30 +02:00
end
end