-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
travis echo version psql modified travis port test removed port test output connection info simplified test for json postgres phone attestations phone attestation test isolated test fixed test.sh echo error display version; updated travis including all tests exited test removed comments
- Loading branch information
1 parent
e3069b8
commit 0349067
Showing
6 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
var config = require('../config'); | ||
var store = require('../lib/store')(config.dbtype); | ||
var assert = require('assert') | ||
|
||
var QL = require('queuelib') | ||
|
||
var q = new QL; | ||
|
||
q.series([ | ||
function(lib) { | ||
store.db.raw('select version()').then(function(resp) { | ||
console.log("VERSION:", resp) | ||
lib.done(); | ||
}); | ||
}, | ||
function(lib) { | ||
store.db('attestations') | ||
.truncate() | ||
.then(function() { | ||
return store.db('attestations') | ||
.insert({id:'catcat',payload:{foo:'bar',life:42,animal:{cat:'gabby'}}}) | ||
}) | ||
.then(function() { | ||
lib.done() | ||
}); | ||
}, | ||
function(lib) { | ||
store.db('attestations') | ||
.whereRaw("payload->>'life' = ?", 42) | ||
.select() | ||
.then(function(resp) { | ||
assert.equal(84,resp[0].payload.life*2) | ||
assert.equal('gabby',resp[0].payload.animal.cat) | ||
console.log("all done") | ||
lib.done() | ||
process.exit() | ||
}) | ||
} | ||
]) | ||
|