aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/datepicker/datepicker_methods.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/datepicker/datepicker_methods.js')
-rw-r--r--tests/unit/datepicker/datepicker_methods.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/unit/datepicker/datepicker_methods.js b/tests/unit/datepicker/datepicker_methods.js
index e7aa7602e..5e692d1a0 100644
--- a/tests/unit/datepicker/datepicker_methods.js
+++ b/tests/unit/datepicker/datepicker_methods.js
@@ -10,56 +10,56 @@ test('destroy', function() {
var inl,
inp = init('#inp');
ok(inp.is('.hasDatepicker'), 'Default - marker class set');
- ok($.data(inp[0], PROP_NAME), 'Default - instance present');
+ ok($.data(inp[0], TestHelpers.PROP_NAME), 'Default - instance present');
ok(inp.next().is('#alt'), 'Default - button absent');
inp.datepicker('destroy');
inp = $('#inp');
ok(!inp.is('.hasDatepicker'), 'Default - marker class cleared');
- ok(!$.data(inp[0], PROP_NAME), 'Default - instance absent');
+ ok(!$.data(inp[0], TestHelpers.PROP_NAME), 'Default - instance absent');
ok(inp.next().is('#alt'), 'Default - button absent');
// With button
inp= init('#inp', {showOn: 'both'});
ok(inp.is('.hasDatepicker'), 'Button - marker class set');
- ok($.data(inp[0], PROP_NAME), 'Button - instance present');
+ ok($.data(inp[0], TestHelpers.PROP_NAME), 'Button - instance present');
ok(inp.next().text() === '...', 'Button - button added');
inp.datepicker('destroy');
inp = $('#inp');
ok(!inp.is('.hasDatepicker'), 'Button - marker class cleared');
- ok(!$.data(inp[0], PROP_NAME), 'Button - instance absent');
+ ok(!$.data(inp[0], TestHelpers.PROP_NAME), 'Button - instance absent');
ok(inp.next().is('#alt'), 'Button - button removed');
// With append text
inp = init('#inp', {appendText: 'Testing'});
ok(inp.is('.hasDatepicker'), 'Append - marker class set');
- ok($.data(inp[0], PROP_NAME), 'Append - instance present');
+ ok($.data(inp[0], TestHelpers.PROP_NAME), 'Append - instance present');
ok(inp.next().text() === 'Testing', 'Append - append text added');
inp.datepicker('destroy');
inp = $('#inp');
ok(!inp.is('.hasDatepicker'), 'Append - marker class cleared');
- ok(!$.data(inp[0], PROP_NAME), 'Append - instance absent');
+ ok(!$.data(inp[0], TestHelpers.PROP_NAME), 'Append - instance absent');
ok(inp.next().is('#alt'), 'Append - append text removed');
// With both
inp= init('#inp', {showOn: 'both', buttonImageOnly: true,
buttonImage: 'img/calendar.gif', appendText: 'Testing'});
ok(inp.is('.hasDatepicker'), 'Both - marker class set');
- ok($.data(inp[0], PROP_NAME), 'Both - instance present');
+ ok($.data(inp[0], TestHelpers.PROP_NAME), 'Both - instance present');
ok(inp.next()[0].nodeName.toLowerCase() === 'img', 'Both - button added');
ok(inp.next().next().text() === 'Testing', 'Both - append text added');
inp.datepicker('destroy');
inp = $('#inp');
ok(!inp.is('.hasDatepicker'), 'Both - marker class cleared');
- ok(!$.data(inp[0], PROP_NAME), 'Both - instance absent');
+ ok(!$.data(inp[0], TestHelpers.PROP_NAME), 'Both - instance absent');
ok(inp.next().is('#alt'), 'Both - button and append text absent');
// Inline
inl = init('#inl');
ok(inl.is('.hasDatepicker'), 'Inline - marker class set');
ok(inl.html() !== '', 'Inline - datepicker present');
- ok($.data(inl[0], PROP_NAME), 'Inline - instance present');
+ ok($.data(inl[0], TestHelpers.PROP_NAME), 'Inline - instance present');
ok(inl.next().length === 0 || inl.next().is('p'), 'Inline - button absent');
inl.datepicker('destroy');
inl = $('#inl');
ok(!inl.is('.hasDatepicker'), 'Inline - marker class cleared');
ok(inl.html() === '', 'Inline - datepicker absent');
- ok(!$.data(inl[0], PROP_NAME), 'Inline - instance absent');
+ ok(!$.data(inl[0], TestHelpers.PROP_NAME), 'Inline - instance absent');
ok(inl.next().length === 0 || inl.next().is('p'), 'Inline - button absent');
});