浏览代码

Added missing test for passing properties when creating model instances.

fredck 10 年之前
父节点
当前提交
7eea823c55
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      packages/ckeditor5-utils/tests/mvc/model/model.js

+ 8 - 0
packages/ckeditor5-utils/tests/mvc/model/model.js

@@ -45,6 +45,14 @@ describe( 'Model', function() {
 		expect( car.color ).to.equal( 'blue' );
 	} );
 
+	it( 'should add properties on creation', function() {
+		var car = new Car( null, {
+			prop: 1
+		} );
+
+		expect( car ).to.have.property( 'prop' ).to.equals( 1 );
+	} );
+
 	//////////
 
 	describe( 'set', function() {