From d5da9a6ba1aa802201671af973e028620286681b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 10 May 2012 22:39:06 +0200 Subject: specs: Board link->json->link --- spec/board_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/board_spec.rb b/spec/board_spec.rb index 45d4112..d876861 100644 --- a/spec/board_spec.rb +++ b/spec/board_spec.rb @@ -73,6 +73,19 @@ describe EvenDoors::Board do b0.follow.should be_true end # + it "link->json->link" do + board = EvenDoors::Board.new 'hell' + p0 = EvenDoors::Particle.new + p1 = EvenDoors::Particle.new + p1['v0']=0 + p1.set_link_fields 'v0' + board.process_p p0 + board.process_p p1 + hell = EvenDoors::Board.json_create( JSON.load( JSON.generate(board) ) ) + board.name.should eql hell.name + JSON.generate(board).should eql JSON.generate(hell) + end + # end # # EOF -- cgit v1.1-2-g2b99