Skip to content

Instantly share code, notes, and snippets.

@dai-shi
Created March 28, 2016 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dai-shi/0227418d9c9484236609 to your computer and use it in GitHub Desktop.
Save dai-shi/0227418d9c9484236609 to your computer and use it in GitHub Desktop.
diff --git a/imports/api/tasks.tests.js b/imports/api/tasks.tests.js
index 05287ba..1359e85 100644
--- a/imports/api/tasks.tests.js
+++ b/imports/api/tasks.tests.js
@@ -1,10 +1,26 @@
/* eslint-env mocha */
import { Meteor } from 'meteor/meteor';
+import { Random } from 'meteor/random';
+
+import { Tasks } from './tasks.js';
if (Meteor.isServer) {
describe('Tasks', () => {
describe('methods', () => {
+ const userId = Random.id();
+ let taskId;
+
+ beforeEach(() => {
+ Tasks.remove({});
+ taskId = Tasks.insert({
+ text: 'test task',
+ createdAt: new Date(),
+ owner: userId,
+ username: 'tmeasday',
+ });
+ });
+
it('can delete owned task', () => {
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment