Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated old spec.

  • Loading branch information...
commit 758c29d3d52c35e13d0134c61b1d2dbc4ff3e569 1 parent 4fcb6c3
@ibolmo ibolmo authored
Showing with 18 additions and 18 deletions.
  1. +9 −9 1.2/Class/Class.Extras.js
  2. +9 −9 1.2/Element/Element.js
View
18 1.2/Class/Class.Extras.js
@@ -118,7 +118,7 @@ describe("Chain Class", {
expect(foo.val).toEqual('FOO');
expect(bar.val).toEqual('BAR');
},
-
+
"should be able to clear the chain": function(){
var called;
var fn = function(){
@@ -169,7 +169,7 @@ var runEventSpecs = function(type, create){
'should add an Event to the Class': function(){
var object = create();
-
+
object.addEvent('event', Local.fn)[fire]('event');
expect(Local.called).toEqual(1);
@@ -242,7 +242,7 @@ var runEventSpecs = function(type, create){
object[fire]('event2');
expect(Local.called).toEqual(3);
}
-
+
});
};
@@ -259,7 +259,7 @@ describe("Options Class", {
"before all": function(){
Local.OptionsTest = new Class({
Implements: [Options, Events],
-
+
options: {
a: 1,
b: 2
@@ -289,7 +289,7 @@ describe("Options Class with Events", {
"before all": function(){
Local.OptionsTest = new Class({
Implements: [Options, Events],
-
+
options: {
onEvent1: function(){
return true;
@@ -298,19 +298,19 @@ describe("Options Class with Events", {
return false;
}
},
-
+
initialize: function(options){
this.setOptions(options);
}
});
},
-
+
"should add events in the options object if class has implemented the Events class": function(){
var myTest = new Local.OptionsTest({
onEvent2: function(){
return true;
},
-
+
onEvent3: function(){
return true;
}
@@ -323,4 +323,4 @@ describe("Options Class with Events", {
});
-})();
+})();
View
18 1.2/Element/Element.js
@@ -44,7 +44,7 @@ describe('Element constructor', {
expect(password.type).toEqual('password');
expect(password.name).toEqual('password');
expect(password.value).toEqual('password');
-
+
var dad = new Element('div');
dad.adopt(username, password);
dad.inject(document.body);
@@ -172,11 +172,11 @@ describe('Element.set', {
expect(tr.getChildren().length).toEqual(2);
expect(tr.getFirst().className).toEqual('cell');
},
-
+
"adopting should not change the parent of the element doing the adopting": function(){
var baldGuy = new Element('div');
var annie = new Element('span');
-
+
gramps = baldGuy.getParent();
baldGuy.adopt(annie);
expect(baldGuy.getParent()).toEqual(gramps)
@@ -335,7 +335,7 @@ describe('$$', {
'should return multiple Elements for each specific tag': function(){
var sortBy = function(a, b){
- a = $uid(a); b = $uid(b);
+ a = a.uid; b = b.uid;
return a > b ? 1 : -1;
};
var headers1 = $$('h3', 'h4').sort(sortBy);
@@ -1049,7 +1049,7 @@ describe('Element.clone', {
'should clone custom attributes': function(){
var div = new Element('div');
div.setAttribute('foo', 'FOO');
-
+
expect(div.clone().getAttribute('foo')).toEqual('FOO');
}
@@ -1196,9 +1196,9 @@ describe('Element.getProperty', {
var input2 = new Element('input', {type: 'checkbox'});
expect(input2.getProperty('type')).toEqual('checkbox');
-
+
var div = new Element('div', {'html':
- '<select name="test" id="test" multiple="multiple">' +
+ '<select name="test" id="test" multiple="multiple">' +
'<option value="1">option-value</option>' +
'</select>'
});
@@ -1301,7 +1301,7 @@ describe('Element.setProperty', {
var readonly3 = new Element('input', { type: 'text' }).setProperty('readonly', false);
expect(readonly3.getProperty('readonly')).toBeFalsy();
},
-
+
'should setProperty defaultValue of an input Element': function(){
var form = new Element('form');
var defaultValue = new Element('input', {'type': 'text', 'value': '321'});
@@ -1564,4 +1564,4 @@ describe('Elements.extend', function(){
});
-});
+});

0 comments on commit 758c29d

Please sign in to comment.
Something went wrong with that request. Please try again.