Permalink
Browse files

fix: separated the different timestamps (current, future, pre-epoch) …

…out into their own tests
  • Loading branch information...
1 parent 49fe680 commit 10e48212cc2900db2895fa5b893b578de5cd5207 @tim-dev tim-dev committed Nov 15, 2013
Showing with 9 additions and 5 deletions.
  1. +3 −1 test/cql3.js
  2. +6 −4 test/helpers/cql3.json
View
@@ -302,7 +302,9 @@ module.exports = {
}),
'test cql timestamp create table':testResultless(config['timestamp_create']),
- 'test cql timestamp update':testResultless(config['timestamp_update#cql'], makeDates(config['timestamp_update#vals'])),
+ 'test cql timestamp update1':testResultless(config['timestamp_update#cql'], makeDates(config['timestamp_update#vals1'])),
+ 'test cql timestamp update2':testResultless(config['timestamp_update#cql'], makeDates(config['timestamp_update#vals2'])),
+ 'test cql timestamp update3':testResultless(config['timestamp_update#cql'], makeDates(config['timestamp_update#vals3'])),
'test cql timestamp invalid date': function(test, assert) {
assert.throws(function(){
conn.cql(config['timestamp_invalid#cql'], makeDates(config['timestamp_invalid#vals']))
View
@@ -51,10 +51,12 @@
"integers_select2#cql" : "SELECT * FROM integers where number = -1",
"integers_select3#cql" : "SELECT * FROM integers where number = -2",
- "timestamp_create" : "CREATE TABLE timestamps (old timestamp, current timestamp, future timestamp, PRIMARY KEY (old))",
- "timestamp_update#cql" : "UPDATE timestamps SET current = ?, future = ? WHERE old = ?",
- "timestamp_update#vals" : [null, "2100-01-01", "1969-07-20"],
- "timestamp_invalid#cql" : "UPDATE timestamps SET current = ? WHERE old = ?",
+ "timestamp_create" : "CREATE TABLE timestamps (ts1 timestamp, ts2 timestamp, PRIMARY KEY (ts1))",
+ "timestamp_update#cql" : "UPDATE timestamps SET ts2 = ? WHERE ts1 = ?",
+ "timestamp_update#vals1" : [null, null],
+ "timestamp_update#vals2" : [null, "2100-01-01"],
+ "timestamp_update#vals3" : [null, "1969-07-20"],
+ "timestamp_invalid#cql" : "UPDATE timestamps SET ts2 = ? ts1 old = ?",
"timestamp_invalid#vals" : [null, "THIS ISNT A DATE"],
"prepare#cql" : "SELECT * FROM ? WHERE KEY = ?",

0 comments on commit 10e4821

Please sign in to comment.