Skip to content

Commit

Permalink
Add spec for init()
Browse files Browse the repository at this point in the history
  • Loading branch information
lichtr committed Jun 2, 2014
1 parent 7385a12 commit f158d69
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/arethusa.search/search_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,13 @@ describe('search', function() {
expect(search.pluginsWithSearch(plugins)).toEqual([ pluginA, pluginC ]);
});
});

describe('this.init', function() {
it('initializes the plugin by collecting all token strings and providing a model for input form', function() {
search.init();
var res = {'Arma': ['01'], 'virum': ['02', '03'], 'cano': ['04']};
expect(search.strings).toEqual(res);
expect(search.tokenQuery).toEqual('');
});
});
});

0 comments on commit f158d69

Please sign in to comment.