Przeglądaj źródła

Added missing test for passing properties when creating model instances.

fredck 10 lat temu
rodzic
commit
7eea823c55

+ 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() {