Sha256: 13404135888a4a5b13bd8f0a8642e64b7f7694733d165514bdc699fb343fbb70

Contents?: true

Size: 891 Bytes

Versions: 8

Compression:

Stored size: 891 Bytes

Contents

describe(rio.components.Checkbox, {
	beforeEach: function() {
		this.checkbox = rio.components.Checkbox.example("checked");
		insertComponent(this.checkbox);
	},
	
	"should have an html checkbox element": function() {
		this.checkbox.html().childElements()[0].tagName.shouldEqual("INPUT");
		this.checkbox.html().childElements()[0].type.shouldEqual("checkbox");
	},
	
	"should have a checked html element": function() {
		this.checkbox.html().childElements()[0].checked.shouldBeTrue();
	},
	
	"should update the checked attribute when updating the html checkbox": function() {
		this.checkbox.html().childElements()[0].simulate("click");
		this.checkbox.getChecked().shouldBeFalse();
	},
	
	"should update the html checked attribute when update the checked attribute": function() {
		this.checkbox.setChecked(false);
		this.checkbox.html().childElements()[0].checked.shouldBeFalse();
	}

});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
riojs-0.0.7 public/javascripts/specs/components/checkbox_spec.js
riojs-0.0.6 public/javascripts/specs/components/checkbox_spec.js
riojs-0.0.5 public/javascripts/specs/components/checkbox_spec.js
riojs-0.0.4 public/javascripts/specs/components/checkbox_spec.js
riojs-0.0.3 public/javascripts/specs/components/checkbox_spec.js
riojs-0.0.2 public/javascripts/specs/components/checkbox_spec.js
riojs-0.0.1 public/javascripts/specs/components/checkbox_spec.js
riojs-0.0.0 public/javascripts/specs/components/checkbox_spec.js