summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-10 22:39:06 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-10 22:39:06 +0200
commitd5da9a6ba1aa802201671af973e028620286681b (patch)
treea85cb3a8d8bbd374d589f3308cc4a7150188a1f1
parent35e2ab44bd633702a363fea3752affb31f2094e3 (diff)
downloadedoors-ruby-d5da9a6ba1aa802201671af973e028620286681b.zip
edoors-ruby-d5da9a6ba1aa802201671af973e028620286681b.tar.gz
specs: Board link->json->link
-rw-r--r--spec/board_spec.rb13
1 files changed, 13 insertions, 0 deletions
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