Fixing the subject unmarshall: Closes #32
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
		
							parent
							
								
									88934971d5
								
							
						
					
					
						commit
						b51876a020
					
				|  | @ -51,6 +51,10 @@ setterByAttribute[Constants.STRUCTURED_ATTRS_03.CONTENT_TYPE] = { | |||
|   name: "dataContentType", | ||||
|   parser: (v) => v | ||||
| }; | ||||
| setterByAttribute[Constants.STRUCTURED_ATTRS_03.SUBJECT] = { | ||||
|   name: "subject", | ||||
|   parser: (v) => v | ||||
| }; | ||||
| setterByAttribute[Constants.STRUCTURED_ATTRS_03.DATA] = { | ||||
|   name: "data", | ||||
|   parser: (v) => v | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ const webhook     = "https://cloudevents.io/webhook"; | |||
| const contentType = "application/cloudevents+json; charset=utf-8"; | ||||
| const now         = new Date(); | ||||
| const schemaurl   = "http://cloudevents.io/schema.json"; | ||||
| 
 | ||||
| const subject     = "subject.ext"; | ||||
| const ceContentType = "application/json"; | ||||
| 
 | ||||
| const data = { | ||||
|  | @ -118,9 +118,10 @@ describe("HTTP Transport Binding Unmarshaller for CloudEvents v0.3", () => { | |||
|         new Cloudevent(v03.Spec) | ||||
|           .type(type) | ||||
|           .source(source) | ||||
|           .contenttype(ceContentType) | ||||
|           .dataContentType(ceContentType) | ||||
|           .time(now) | ||||
|           .schemaurl(schemaurl) | ||||
|           .subject(subject) | ||||
|           .data(data) | ||||
|           .toString(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue