Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
eadehemingway committed May 11, 2018
1 parent 347475f commit abdbf39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/model/database/db_connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require('env2')('./config.env');

const DB_URL =
process.env.ENV === 'test'
? process.env.DB_TEST_URL
? process.env.TEST_DB_URL
: process.env.DB_URL;

if (!DB_URL) {
Expand Down
1 change: 1 addition & 0 deletions src/model/queries/getQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const dbConnect = require('../database/db_connect.js');
const getUserData = username => dbConnect.query('SELECT password FROM users WHERE username=$1', [username])
.then(res => res[0]);


// get all user symptoms from symptoms table
const getSymptoms = username => dbConnect.query('select symptom from symptoms where user_id = (select id from users where username=$1)', [username]);
// get all user factors from factor table
Expand Down
4 changes: 2 additions & 2 deletions src/tests/queries.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test('testing that getUserData returns an object with user password', (t) => {
// test query to get a symptom from symptoms table
test('testing symptoms query returns something', (t) => {
runDbBuild()
.then(() => getSymptoms(1))
.then(() => getSymptoms('eade'))
.then((queryResult) => {
t.ok(queryResult);
t.end();
Expand All @@ -48,7 +48,7 @@ test('testing symptoms query returns something', (t) => {
// test query to get a factor from factors table
test('testing factors query returns something', (t) => {
runDbBuild()
.then(() => getFactors(1))
.then(() => getFactors('eade'))
.then((queryResult) => {
t.ok(queryResult);
t.end();
Expand Down

0 comments on commit abdbf39

Please sign in to comment.