Skip to content

Dev #606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jul 15, 2013
Merged

Dev #606

Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
83b6840
Start tests for timepicker functions. Test timezoneOffsetNumber() and…
srvance Jul 8, 2013
7bc2133
Expand timezoneOffsetNumber() docs
srvance Jul 8, 2013
4b34372
Test timepicker.timezoneOffsetString(). Fix lower range issue and sim…
srvance Jul 9, 2013
1adc385
Fix some jsdoc.
srvance Jul 13, 2013
7c389ba
Test timepicker.log()
srvance Jul 13, 2013
b23be92
Test timepicker.timezoneAdjust()
srvance Jul 13, 2013
af26afc
Minor simplification of timepicker.timezoneAdjust(). Left the additio…
srvance Jul 13, 2013
9254a37
Test the callers of timepicker.handleRange. The tests are a bit imple…
srvance Jul 13, 2013
fe89724
Doco fix.
srvance Jul 13, 2013
afb4c98
Simplify range convenience function tests.
srvance Jul 13, 2013
f363202
Add placeholder for handleRange, but I'm not quite ready to tackle th…
srvance Jul 13, 2013
ff99363
Expose splitDateTime for testing.
srvance Jul 14, 2013
f589d84
Tests for splitDateTime, except for error paths.
srvance Jul 14, 2013
b2633f1
Expose parseDateTimeInternal for testing. I'm going to test it even t…
srvance Jul 14, 2013
1cc967a
Tests for parseDateTimeInternal(). The exception test found a bug.
srvance Jul 14, 2013
c264915
Fix parseDateTimeInternal() bug. The parsers returned false. The func…
srvance Jul 14, 2013
353ff5e
Refactored parseDateTimeInternal() to make it a little simpler to rea…
srvance Jul 14, 2013
f3456ce
Now that the basic time and date parsing functions are test protected…
srvance Jul 14, 2013
5109082
Eliminate an unused intermediate variable.
srvance Jul 14, 2013
11a2545
Refactor the effective setting computations out of splitDateTime()
srvance Jul 14, 2013
ea7babe
Write direct tests for the new computeEffectiveSetting() function. Le…
srvance Jul 14, 2013
6adc077
I dug into the project history to figure out how to test the error pa…
srvance Jul 14, 2013
f50fc08
Refactor splitDateTime() signature to eliminate two unused parameters.
srvance Jul 14, 2013
bb7e010
Refactor the dateFormat in the parseDateTimeInternal tests.
srvance Jul 15, 2013
032adf1
Use the alias for the timepicker utils to simplify the tests.
srvance Jul 15, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test the callers of timepicker.handleRange. The tests are a bit imple…
…mentational, but that's all the methods under test do.
  • Loading branch information
srvance committed Jul 13, 2013
commit 9254a37cbf70840c477ab170e03fc1dcad14abd1
39 changes: 39 additions & 0 deletions test/jquery-ui-timepicker-addon_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,44 @@ describe('datetimepicker', function() {
window.console = originalConsole;
});
});

describe('timeRange', function() {
it('calls handleRange the right way', function() {
var startTime = new Date(),
endTime = new Date(),
options = {};
spyOn($.timepicker, 'handleRange');

$.timepicker.timeRange(startTime, endTime, options);

expect($.timepicker.handleRange).toHaveBeenCalledWith('timepicker', startTime, endTime, options);
});
});

describe('datetimeRange', function() {
it('calls handleRange the right way', function() {
var startTime = new Date(),
endTime = new Date(),
options = {};
spyOn($.timepicker, 'handleRange');

$.timepicker.datetimeRange(startTime, endTime, options);

expect($.timepicker.handleRange).toHaveBeenCalledWith('datetimepicker', startTime, endTime, options);
});
});

describe('dateRange', function() {
it('calls handleRange the right way', function() {
var startTime = new Date(),
endTime = new Date(),
options = {};
spyOn($.timepicker, 'handleRange');

$.timepicker.dateRange(startTime, endTime, options);

expect($.timepicker.handleRange).toHaveBeenCalledWith('datepicker', startTime, endTime, options);
});
});
});
});