@@ -9,16 +9,44 @@ describe 'Test graph protocol schema on event', ->
9
9
tv4 .addSchema ' /shared/' , sharedSchema
10
10
tv4 .addSchema ' /graph/' , graphSchema
11
11
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
+
12
44
describe ' addnode' , ->
13
45
schema = ' /graph/input/addnode'
14
46
15
47
it ' should have input schema' , ->
16
48
chai .expect (tv4 .getSchema schema).to .exist
17
49
18
- it ' should have output shema' , ->
19
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
20
- tv4 .getSchema (' /graph/output/addnode' ).properties )
21
-
22
50
it ' should validate event with required fields' , ->
23
51
event =
24
52
protocol : ' graph'
@@ -70,10 +98,6 @@ describe 'Test graph protocol schema on event', ->
70
98
it ' should have input schema' , ->
71
99
chai .expect (tv4 .getSchema schema).to .exist
72
100
73
- it ' should have output shema' , ->
74
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
75
- tv4 .getSchema (' /graph/output/removenode' ).properties )
76
-
77
101
it ' should validate event with required fields' , ->
78
102
event =
79
103
protocol : ' graph'
@@ -90,10 +114,6 @@ describe 'Test graph protocol schema on event', ->
90
114
it ' should have input schema' , ->
91
115
chai .expect (tv4 .getSchema schema).to .exist
92
116
93
- it ' should have output shema' , ->
94
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
95
- tv4 .getSchema (' /graph/output/renamenode' ).properties )
96
-
97
117
it ' should validate event with required fields' , ->
98
118
event =
99
119
protocol : ' graph'
@@ -111,10 +131,6 @@ describe 'Test graph protocol schema on event', ->
111
131
it ' should have input schema' , ->
112
132
chai .expect (tv4 .getSchema schema).to .exist
113
133
114
- it ' should have output shema' , ->
115
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
116
- tv4 .getSchema (' /graph/output/changenode' ).properties )
117
-
118
134
it ' should validate event with required fields' , ->
119
135
event =
120
136
protocol : ' graph'
@@ -144,10 +160,6 @@ describe 'Test graph protocol schema on event', ->
144
160
it ' should have input schema' , ->
145
161
chai .expect (tv4 .getSchema schema).to .exist
146
162
147
- it ' should have output schema' , ->
148
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
149
- tv4 .getSchema (' /graph/output/addedge' ).properties )
150
-
151
163
it ' should validate event with required fields' , ->
152
164
event =
153
165
protocol : ' graph'
@@ -182,10 +194,6 @@ describe 'Test graph protocol schema on event', ->
182
194
it ' should have input schema' , ->
183
195
chai .expect (tv4 .getSchema schema).to .exist
184
196
185
- it ' should have output schema' , ->
186
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
187
- tv4 .getSchema (' /graph/output/removeedge' ).properties )
188
-
189
197
it ' should validate event with required fields' , ->
190
198
event =
191
199
protocol : ' graph'
@@ -207,10 +215,6 @@ describe 'Test graph protocol schema on event', ->
207
215
it ' should have input schema' , ->
208
216
chai .expect (tv4 .getSchema schema).to .exist
209
217
210
- it ' should have output schema' , ->
211
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
212
- tv4 .getSchema (' /graph/output/changeedge' ).properties )
213
-
214
218
it ' should validate event with required fields' , ->
215
219
event =
216
220
protocol : ' graph'
@@ -234,10 +238,6 @@ describe 'Test graph protocol schema on event', ->
234
238
it ' should have input schema' , ->
235
239
chai .expect (tv4 .getSchema schema).to .exist
236
240
237
- it ' should have output shema' , ->
238
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
239
- tv4 .getSchema (' /graph/output/addinitial' ).properties )
240
-
241
241
it ' should validate event with required fields' , ->
242
242
event =
243
243
protocol : ' graph'
@@ -271,10 +271,6 @@ describe 'Test graph protocol schema on event', ->
271
271
it ' should have input shema' , ->
272
272
chai .expect (tv4 .getSchema schema).to .exist
273
273
274
- it ' should have output shema' , ->
275
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
276
- tv4 .getSchema (' /graph/output/removeinitial' ).properties )
277
-
278
274
it ' should validate event with required fields' , ->
279
275
event =
280
276
protocol : ' graph'
@@ -307,10 +303,6 @@ describe 'Test graph protocol schema on event', ->
307
303
it ' should have input shema' , ->
308
304
chai .expect (tv4 .getSchema schema).to .exist
309
305
310
- it ' should have output schema' , ->
311
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
312
- tv4 .getSchema (' /graph/output/addinport' ).properties )
313
-
314
306
it ' should validate event with required fields' , ->
315
307
event =
316
308
protocol : ' graph'
@@ -342,10 +334,6 @@ describe 'Test graph protocol schema on event', ->
342
334
it ' should have input shema' , ->
343
335
chai .expect (tv4 .getSchema schema).to .exist
344
336
345
- it ' should have output schema' , ->
346
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
347
- tv4 .getSchema (' /graph/output/removeinport' ).properties )
348
-
349
337
it ' should validate event with required fields' , ->
350
338
event =
351
339
protocol : ' graph'
@@ -374,10 +362,6 @@ describe 'Test graph protocol schema on event', ->
374
362
it ' should have input shema' , ->
375
363
chai .expect (tv4 .getSchema schema).to .exist
376
364
377
- it ' should have output schema' , ->
378
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
379
- tv4 .getSchema (' /graph/output/renameinport' ).properties )
380
-
381
365
it ' should validate event with required fields' , ->
382
366
event =
383
367
protocol : ' graph'
@@ -395,10 +379,6 @@ describe 'Test graph protocol schema on event', ->
395
379
it ' should have input shema' , ->
396
380
chai .expect (tv4 .getSchema schema).to .exist
397
381
398
- it ' should have output schema' , ->
399
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
400
- tv4 .getSchema (' /graph/output/addoutport' ).properties )
401
-
402
382
it ' should validate event with required fields' , ->
403
383
event =
404
384
protocol : ' graph'
@@ -430,10 +410,6 @@ describe 'Test graph protocol schema on event', ->
430
410
it ' should have input shema' , ->
431
411
chai .expect (tv4 .getSchema schema).to .exist
432
412
433
- it ' should have output schema' , ->
434
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
435
- tv4 .getSchema (' /graph/output/removeoutport' ).properties )
436
-
437
413
it ' should validate event with required fields' , ->
438
414
event =
439
415
protocol : ' graph'
@@ -462,10 +438,6 @@ describe 'Test graph protocol schema on event', ->
462
438
it ' should have input shema' , ->
463
439
chai .expect (tv4 .getSchema schema).to .exist
464
440
465
- it ' should have output schema' , ->
466
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
467
- tv4 .getSchema (' /graph/output/renameoutport' ).properties )
468
-
469
441
it ' should validate event with required fields' , ->
470
442
event =
471
443
protocol : ' graph'
@@ -483,10 +455,6 @@ describe 'Test graph protocol schema on event', ->
483
455
it ' should have input schema' , ->
484
456
chai .expect (tv4 .getSchema schema).to .exist
485
457
486
- it ' should have output shema' , ->
487
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
488
- tv4 .getSchema (' /graph/output/addgroup' ).properties )
489
-
490
458
it ' should validate event with required fields' , ->
491
459
event =
492
460
protocol : ' graph'
@@ -516,10 +484,6 @@ describe 'Test graph protocol schema on event', ->
516
484
it ' should have input shema' , ->
517
485
chai .expect (tv4 .getSchema schema).to .exist
518
486
519
- it ' should have output schema' , ->
520
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
521
- tv4 .getSchema (' /graph/output/removegroup' ).properties )
522
-
523
487
it ' should validate event with required fields' , ->
524
488
event =
525
489
protocol : ' graph'
@@ -536,10 +500,6 @@ describe 'Test graph protocol schema on event', ->
536
500
it ' should have input shema' , ->
537
501
chai .expect (tv4 .getSchema schema).to .exist
538
502
539
- it ' should have output schema' , ->
540
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
541
- tv4 .getSchema (' /graph/output/renamegroup' ).properties )
542
-
543
503
it ' should validate event with required fields' , ->
544
504
event =
545
505
protocol : ' graph'
@@ -557,10 +517,6 @@ describe 'Test graph protocol schema on event', ->
557
517
it ' should have input schema' , ->
558
518
chai .expect (tv4 .getSchema schema).to .exist
559
519
560
- it ' should have output shema' , ->
561
- chai .expect (tv4 .getSchema (schema).properties ).to .eql (
562
- tv4 .getSchema (' /graph/output/changegroup' ).properties )
563
-
564
520
it ' should validate event with required fields' , ->
565
521
event =
566
522
protocol : ' graph'
0 commit comments