From fb977da01d86a71ab36c9c42a1224bb17db95aec Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 29 Nov 2016 17:36:17 -0500 Subject: [PATCH] Adding mocks file. --- pree2e.sh | 2 +- tests/e2e/mocks.js | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/mocks.js diff --git a/pree2e.sh b/pree2e.sh index fbe3b1a87..5cb14287b 100755 --- a/pree2e.sh +++ b/pree2e.sh @@ -1,4 +1,4 @@ node_modules/selenium-standalone/bin/selenium-standalone install source .env-test -echo $TALK_MONGO_URL +node tests/e2e/mocks & npm start & diff --git a/tests/e2e/mocks.js b/tests/e2e/mocks.js new file mode 100644 index 000000000..6abb2b6fe --- /dev/null +++ b/tests/e2e/mocks.js @@ -0,0 +1,20 @@ +const Comments = require('../../models/comment') +const Users = require('../../models/user') +const Actions = require('../../models/action') + +const mockComments = [ + { + body: 'Pangolin pups are called pangopups.', + author_id: '123', + id: 'abc' + }, + { + body: 'Baby whales grow at up to 8lbs an hour.', + author_id: '456', + id: 'def' + } +]; + +console.log('Loading mocks.'); + +Comments.create(mockComments);