Fix taxon service specs

This commit is contained in:
Rob H
2014-08-06 10:41:07 +10:00
parent d9692312ac
commit 59a3fe11ad
3 changed files with 28 additions and 50 deletions

View File

@@ -4,9 +4,7 @@ angular.module("ofn.admin").factory "Taxons", (taxons, $filter) ->
@taxons = taxons
findByIDs: (ids) ->
taxons = []
taxons.push taxon for taxon in @taxons when taxon.id.toString() in ids.split(",")
taxons
taxon for taxon in @taxons when taxon.id in ids.split(",")
findByTerm: (term) ->
$filter('filter')(@taxons, term)