couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowalski <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Changes page content moved to React
Date Wed, 04 Mar 2015 13:04:30 GMT
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/303#discussion_r25772526
  
    --- Diff: app/addons/documents/tests/changes.storesSpec.js ---
    @@ -53,21 +49,50 @@ define([
         it('removeFilter() removes item from store', function () {
           var filter1 = 'My filter 1';
           var filter2 = 'My filter 2';
    -      Stores.changesFilterStore.addFilter(filter1);
    -      Stores.changesFilterStore.addFilter(filter2);
    -      Stores.changesFilterStore.removeFilter(filter1);
    +      Stores.changesStore.addFilter(filter1);
    +      Stores.changesStore.addFilter(filter2);
    +      Stores.changesStore.removeFilter(filter1);
     
    -      var filters = Stores.changesFilterStore.getFilters();
    +      var filters = Stores.changesStore.getFilters();
           assert.ok(filters.length === 1);
           assert.ok(filters[0] === filter2);
         });
     
         it('hasFilter() finds item in store', function () {
           var filter = 'My filter';
    -      Stores.changesFilterStore.addFilter(filter);
    -      assert.ok(Stores.changesFilterStore.hasFilter(filter) === true);
    +      Stores.changesStore.addFilter(filter);
    +      assert.ok(Stores.changesStore.hasFilter(filter) === true);
         });
     
    +
    +    it('getDatabaseName() returns database name', function () {
    +      var dbName = 'hoopoes';
    +      Stores.changesStore.setChanges({ databaseName: dbName });
    +      assert.equal(Stores.changesStore.getDatabaseName(), dbName);
    +
    +      Stores.changesStore.reset();
    +      assert.equal(Stores.changesStore.getDatabaseName(), '');
    +    });
    +
    +    it("getChanges() should return a subset if there are a lot of changes", function
() {
    +
    +      // to keep the test speedy, override the default max value
    +      var maxChanges = 10;
    +      Stores.changesStore.setMaxChanges(maxChanges);
    +
    +      // better underscorey way to do this?
    --- End diff --
    
    times


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message