Clean up code

This commit is contained in:
Alexander Lin
2016-12-10 02:14:30 -08:00
parent 3e92bb22fa
commit 4e303cc592
3 changed files with 10 additions and 19 deletions

View File

@@ -471,11 +471,11 @@ describe('Inventory Controller', function() {
'not': [wrap('chicken'), wrap('sashimi')]};
scope.gearByClass = gearByClass;
scope.gearByType = gearByType;
scope.equipmentFilterQuery.query = 'a';
scope.equipmentQuery.query = 'a';
});
it('filters nothing if equipmentQuery is nothing', function() {
scope.equipmentFilterQuery.query = '';
scope.equipmentQuery.query = '';
scope.$digest();
expect(toText(scope.filteredGearByClass['raw'])).to.eql(['kale', 'sashimi']);
expect(toText(scope.filteredGearByClass['cooked'])).to.eql(['chicken', 'potato']);
@@ -509,7 +509,7 @@ describe('Inventory Controller', function() {
});
it('filters out gear if filter query changes', function() {
scope.equipmentFilterQuery.query = 'c';
scope.equipmentQuery.query = 'c';
scope.$digest();
expect(toText(scope.filteredGearByClass['raw'])).to.eql([]);