You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/10/19 13:38:49 UTC
[GitHub] Antonio-Maranhao commented on a change in pull request #1144:
[partitioned-dbs] Updates to doc editor
Antonio-Maranhao commented on a change in pull request #1144: [partitioned-dbs] Updates to doc editor
URL: https://github.com/apache/couchdb-fauxton/pull/1144#discussion_r226649848
##########
File path: app/addons/documents/__tests__/resources.test.js
##########
@@ -82,6 +83,25 @@ describe('AllDocs', () => {
});
});
+describe('NewDoc', () => {
+
+ let getUUID;
+ beforeEach(() => {
+ getUUID = sinon.stub(Helpers, 'getUUID').resolves({ uuids: ['abc9876'] });
+ });
+
+ afterEach(() => {
+ getUUID.restore();
+ });
+
+ it('adds partition key to auto-generated ID', () => {
+ const newDoc = new Models.NewDoc(null, { database: {}, defaultPartitionKey: 'part_key' });
Review comment:
I guess it was a poor choice of words. I wanted to add some meaning to it instead of simply calling it `partitionKey`, since it's only used as an initial suggestion, and the user can change the final ID, including part key, when they edit the doc.
I will change it to `partitionKey` to avoid confusing
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services