
import { customTaxonomyFilter } from 'dummy/helpers/custom-taxonomy-filter';
import { module, test } from 'qunit';

module('Unit | Helper | custom taxonomy filter');

// Replace this with your real tests.
test('it works', function(assert) {
  let result = customTaxonomyFilter([42]);
  assert.ok(result);
});


@@ -1,17 +1,16 @@
-%0A
 import %7B customT
@@ -164,60 +164,760 @@
 );%0A%0A
-// Replace this with your real tests.%0Atest('it works
+test('replace very deep custom taxonomy hierarchy with just final subject name', function(assert) %7B%0A    let result = customTaxonomyFilter(%5B'bepress/Fruits/Bananas/Green Bananas/Small Green Bananas/Small Green Bananas with Polka Dots'%5D);%0A    assert.equal(result, 'Small Green Bananas with Polka Dots');%0A%7D);%0A%0Atest('replace shallow custom taxonomy with just final subject name', function(assert) %7B%0A    let result = customTaxonomyFilter(%5B'bepress/Fruits'%5D);%0A    assert.equal(result, 'Fruits');%0A%7D);%0A%0Atest('return original subject if not a custom taxonomy', function(assert) %7B%0A    let result = customTaxonomyFilter(%5B'Fruits and Bananas'%5D);%0A    assert.equal(result, 'Fruits and Bananas');%0A%7D);%0A%0Atest('return original subject if not a recognized custom taxonomy
 ', f
@@ -934,16 +934,18 @@
 sert) %7B%0A
+  
   let re
@@ -977,14 +977,34 @@
 er(%5B
-42
+'osf/Fruits/Bananas'
 %5D);%0A
+  
   as
@@ -1012,21 +1012,45 @@
 ert.
-ok
+equal
 (result
+, 'osf/Fruits/Bananas'
 );%0A%7D);%0A
-%0A

Add tests to custom-taxonomy-filter