it('clears all completed tasks', function() {
            var masterCollection = new Tasks([
                {title: '1', isActive: false},
                {title: '2', isActive: false},
                {title: '3', isActive: false}
            ],
            {
                ignoreLocalStorage: true
            });
            var listLayout = new ListLayout({
                collection: masterCollection
            });
            region.show(listLayout);

            listLayout.wantsClearCompleted();
            expect(listLayout.collection.length).toEqual(0);
        });
        it('toggles all tasks based on a toggle-all', function() {
            var masterCollection = new Tasks([
                {title: '1', isActive: true},
                {title: '2', isActive: true},
                {title: '3', isActive: true}
            ],
            {
                ignoreLocalStorage: true
            });
            var listLayout = new ListLayout({
                collection: masterCollection
            });
            region.show(listLayout);

            listLayout.wantsToggleAll();
            listLayout.collection.models.forEach(function(model) {
                expect(model.attributes.isActive).toBe(false);
            });
        });
        it('switches between collection views', function() {
            var masterCollection = new Tasks([
                {title: '1'},
                {title: '2', isActive: true},
                {title: '3', isActive: false}
            ],
            {
                ignoreLocalStorage: true
            });
            var listLayout = new ListLayout({
                collection: masterCollection
            });
            region.show(listLayout);
            var partitions = listLayout.partitions;

            expect(listLayout.currentCollectionView).toEqual(partitions['*']);

            listLayout.showCollection(partitions['active'])
            expect(listLayout.currentCollectionView).toEqual(partitions['active']);

            listLayout.showCollection(partitions['completed'])
            expect(listLayout.currentCollectionView).toEqual(partitions['completed']);

        });