@@ -9,16 +9,44 @@ describe 'Test graph protocol schema on event', ->
99 tv4 .addSchema ' /shared/' , sharedSchema
1010 tv4 .addSchema ' /graph/' , graphSchema
1111
12+ describe ' receipt' , ->
13+ schema = ' /graph/output/receipt'
14+
15+ it ' should have output schema' , ->
16+ chai .expect (tv4 .getSchema schema).to .exist
17+
18+ it ' should validate event with required fields' , ->
19+ event =
20+ protocol : ' graph'
21+ command : ' receipt'
22+ payload :
23+ message_id : ' message1'
24+ success : true
25+
26+ chai .expect (tv4 .validate event, schema).to .be .true
27+
28+ describe ' clear' , ->
29+ schema = ' /graph/input/clear'
30+
31+ it ' should have input schema' , ->
32+ chai .expect (tv4 .getSchema schema).to .exist
33+
34+ it ' should validate event with required fields' , ->
35+ event =
36+ protocol : ' graph'
37+ command : ' clear'
38+ payload :
39+ id : ' graph1'
40+ secret : ' abcdefg'
41+
42+ chai .expect (tv4 .validate event, schema).to .be .true
43+
1244 describe ' addnode' , ->
1345 schema = ' /graph/input/addnode'
1446
1547 it ' should have input schema' , ->
1648 chai .expect (tv4 .getSchema schema).to .exist
1749
18- it ' should have output shema' , ->
19- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
20- tv4 .getSchema (' /graph/output/addnode' ).properties )
21-
2250 it ' should validate event with required fields' , ->
2351 event =
2452 protocol : ' graph'
@@ -70,10 +98,6 @@ describe 'Test graph protocol schema on event', ->
7098 it ' should have input schema' , ->
7199 chai .expect (tv4 .getSchema schema).to .exist
72100
73- it ' should have output shema' , ->
74- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
75- tv4 .getSchema (' /graph/output/removenode' ).properties )
76-
77101 it ' should validate event with required fields' , ->
78102 event =
79103 protocol : ' graph'
@@ -90,10 +114,6 @@ describe 'Test graph protocol schema on event', ->
90114 it ' should have input schema' , ->
91115 chai .expect (tv4 .getSchema schema).to .exist
92116
93- it ' should have output shema' , ->
94- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
95- tv4 .getSchema (' /graph/output/renamenode' ).properties )
96-
97117 it ' should validate event with required fields' , ->
98118 event =
99119 protocol : ' graph'
@@ -111,10 +131,6 @@ describe 'Test graph protocol schema on event', ->
111131 it ' should have input schema' , ->
112132 chai .expect (tv4 .getSchema schema).to .exist
113133
114- it ' should have output shema' , ->
115- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
116- tv4 .getSchema (' /graph/output/changenode' ).properties )
117-
118134 it ' should validate event with required fields' , ->
119135 event =
120136 protocol : ' graph'
@@ -144,10 +160,6 @@ describe 'Test graph protocol schema on event', ->
144160 it ' should have input schema' , ->
145161 chai .expect (tv4 .getSchema schema).to .exist
146162
147- it ' should have output schema' , ->
148- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
149- tv4 .getSchema (' /graph/output/addedge' ).properties )
150-
151163 it ' should validate event with required fields' , ->
152164 event =
153165 protocol : ' graph'
@@ -182,10 +194,6 @@ describe 'Test graph protocol schema on event', ->
182194 it ' should have input schema' , ->
183195 chai .expect (tv4 .getSchema schema).to .exist
184196
185- it ' should have output schema' , ->
186- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
187- tv4 .getSchema (' /graph/output/removeedge' ).properties )
188-
189197 it ' should validate event with required fields' , ->
190198 event =
191199 protocol : ' graph'
@@ -207,10 +215,6 @@ describe 'Test graph protocol schema on event', ->
207215 it ' should have input schema' , ->
208216 chai .expect (tv4 .getSchema schema).to .exist
209217
210- it ' should have output schema' , ->
211- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
212- tv4 .getSchema (' /graph/output/changeedge' ).properties )
213-
214218 it ' should validate event with required fields' , ->
215219 event =
216220 protocol : ' graph'
@@ -234,10 +238,6 @@ describe 'Test graph protocol schema on event', ->
234238 it ' should have input schema' , ->
235239 chai .expect (tv4 .getSchema schema).to .exist
236240
237- it ' should have output shema' , ->
238- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
239- tv4 .getSchema (' /graph/output/addinitial' ).properties )
240-
241241 it ' should validate event with required fields' , ->
242242 event =
243243 protocol : ' graph'
@@ -271,10 +271,6 @@ describe 'Test graph protocol schema on event', ->
271271 it ' should have input shema' , ->
272272 chai .expect (tv4 .getSchema schema).to .exist
273273
274- it ' should have output shema' , ->
275- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
276- tv4 .getSchema (' /graph/output/removeinitial' ).properties )
277-
278274 it ' should validate event with required fields' , ->
279275 event =
280276 protocol : ' graph'
@@ -307,10 +303,6 @@ describe 'Test graph protocol schema on event', ->
307303 it ' should have input shema' , ->
308304 chai .expect (tv4 .getSchema schema).to .exist
309305
310- it ' should have output schema' , ->
311- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
312- tv4 .getSchema (' /graph/output/addinport' ).properties )
313-
314306 it ' should validate event with required fields' , ->
315307 event =
316308 protocol : ' graph'
@@ -342,10 +334,6 @@ describe 'Test graph protocol schema on event', ->
342334 it ' should have input shema' , ->
343335 chai .expect (tv4 .getSchema schema).to .exist
344336
345- it ' should have output schema' , ->
346- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
347- tv4 .getSchema (' /graph/output/removeinport' ).properties )
348-
349337 it ' should validate event with required fields' , ->
350338 event =
351339 protocol : ' graph'
@@ -374,10 +362,6 @@ describe 'Test graph protocol schema on event', ->
374362 it ' should have input shema' , ->
375363 chai .expect (tv4 .getSchema schema).to .exist
376364
377- it ' should have output schema' , ->
378- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
379- tv4 .getSchema (' /graph/output/renameinport' ).properties )
380-
381365 it ' should validate event with required fields' , ->
382366 event =
383367 protocol : ' graph'
@@ -395,10 +379,6 @@ describe 'Test graph protocol schema on event', ->
395379 it ' should have input shema' , ->
396380 chai .expect (tv4 .getSchema schema).to .exist
397381
398- it ' should have output schema' , ->
399- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
400- tv4 .getSchema (' /graph/output/addoutport' ).properties )
401-
402382 it ' should validate event with required fields' , ->
403383 event =
404384 protocol : ' graph'
@@ -430,10 +410,6 @@ describe 'Test graph protocol schema on event', ->
430410 it ' should have input shema' , ->
431411 chai .expect (tv4 .getSchema schema).to .exist
432412
433- it ' should have output schema' , ->
434- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
435- tv4 .getSchema (' /graph/output/removeoutport' ).properties )
436-
437413 it ' should validate event with required fields' , ->
438414 event =
439415 protocol : ' graph'
@@ -462,10 +438,6 @@ describe 'Test graph protocol schema on event', ->
462438 it ' should have input shema' , ->
463439 chai .expect (tv4 .getSchema schema).to .exist
464440
465- it ' should have output schema' , ->
466- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
467- tv4 .getSchema (' /graph/output/renameoutport' ).properties )
468-
469441 it ' should validate event with required fields' , ->
470442 event =
471443 protocol : ' graph'
@@ -483,10 +455,6 @@ describe 'Test graph protocol schema on event', ->
483455 it ' should have input schema' , ->
484456 chai .expect (tv4 .getSchema schema).to .exist
485457
486- it ' should have output shema' , ->
487- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
488- tv4 .getSchema (' /graph/output/addgroup' ).properties )
489-
490458 it ' should validate event with required fields' , ->
491459 event =
492460 protocol : ' graph'
@@ -516,10 +484,6 @@ describe 'Test graph protocol schema on event', ->
516484 it ' should have input shema' , ->
517485 chai .expect (tv4 .getSchema schema).to .exist
518486
519- it ' should have output schema' , ->
520- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
521- tv4 .getSchema (' /graph/output/removegroup' ).properties )
522-
523487 it ' should validate event with required fields' , ->
524488 event =
525489 protocol : ' graph'
@@ -536,10 +500,6 @@ describe 'Test graph protocol schema on event', ->
536500 it ' should have input shema' , ->
537501 chai .expect (tv4 .getSchema schema).to .exist
538502
539- it ' should have output schema' , ->
540- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
541- tv4 .getSchema (' /graph/output/renamegroup' ).properties )
542-
543503 it ' should validate event with required fields' , ->
544504 event =
545505 protocol : ' graph'
@@ -557,10 +517,6 @@ describe 'Test graph protocol schema on event', ->
557517 it ' should have input schema' , ->
558518 chai .expect (tv4 .getSchema schema).to .exist
559519
560- it ' should have output shema' , ->
561- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
562- tv4 .getSchema (' /graph/output/changegroup' ).properties )
563-
564520 it ' should validate event with required fields' , ->
565521 event =
566522 protocol : ' graph'
0 commit comments