Last active
October 17, 2017 16:08
-
-
Save georgesboris/56acad9dafc7845a8db206f5983a1ba8 to your computer and use it in GitHub Desktop.
firebase-app - tests
This file contains hidden or 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
// first setup your mocha env as described on targaryen's docs. | |
// ...then: | |
const { paths, actions, getActionUpdates, applyAction } = require('../firebase-app'); | |
describe('firebase-app userflow', () => { | |
it('should be able to update post if is author', () => { | |
const { updates } = getActionUpdates(updatePost, { | |
post: 'post_1', | |
value: 'My body (with adjustments)' | |
}); | |
expect({ uid: 'user_1' }).can.patch(updates).path('/'); | |
expect({ uid: 'user_2' }).cannot.patch(updates).path('/'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment