Permalink
Browse files

Remove lastUUIDForTime and firstUUIDForTime wrappers, #4

  • Loading branch information...
ctavan committed Nov 13, 2011
1 parent de9127c commit 6fc1fe29f8d8b8c9ac85102c0b174d02f093e645
Showing with 1 addition and 37 deletions.
  1. +0 −6 lib/uuid.js
  2. +1 −31 test/uuid.js
View
@@ -229,11 +229,5 @@ UUIDjs.new = function() {
UUIDjs.newTS = function() {
return this.create(1);
};
-UUIDjs.firstUUIDForTime = function(time) {
- return UUIDjs.firstFromTime(time);
-};
-UUIDjs.lastUUIDForTime = function(time) {
- return UUIDjs.lastFromTime(time);
-};
module.exports = UUIDjs;
View
@@ -41,9 +41,7 @@ exports['Check UUID methods'] = function() {
'fromBinary',
// Legacy methods:
'new',
- 'newTS',
- 'firstUUIDForTime',
- 'lastUUIDForTime'
+ 'newTS'
];
var found = 0;
for (var key in UUID) {
@@ -332,34 +330,6 @@ exports['newTS() alias for create(1)'] = function() {
};
-exports['firstUUIDForTime() alias for firstFromTime()'] = function() {
- var spy = sinon.spy(UUID, 'firstFromTime');
-
- var date = new Date();
- date = date.getTime();
- var uuid = UUID.firstUUIDForTime(date);
-
- assert.ok(spy.calledOnce);
- assert.ok(spy.calledWith(date));
-
- spy.restore();
-};
-
-
-exports['lastUUIDForTime() alias for lastFromTime()'] = function() {
- var spy = sinon.spy(UUID, 'lastFromTime');
-
- var date = new Date();
- date = date.getTime();
- var uuid = UUID.lastUUIDForTime(date);
-
- assert.ok(spy.calledOnce);
- assert.ok(spy.calledWith(date));
-
- spy.restore();
-};
-
-
for (var key in exports) {
exports[key]();
console.log('' + key);

0 comments on commit 6fc1fe2

Please sign in to comment.