Commit fa0fae86 authored by gergely-ujvari's avatar gergely-ujvari Committed by Randall Leeds

searchfilter uses tag instead of tags

parent 9ffe1bbc
......@@ -110,7 +110,7 @@ class SearchFilter
terms: since
operator: 'and'
lowercase: false
tag:
tags:
terms: tag
operator: 'and'
lowercase: true
......
......@@ -136,7 +136,6 @@ describe 'h.directives', ->
describe '.simpleSearch', ->
$element = null
beforeEach ->
$scope.query = {}
$scope.update = sinon.spy()
$scope.clear = sinon.spy()
......@@ -152,12 +151,12 @@ describe 'h.directives', ->
$scope.$digest()
it 'updates the search-bar', ->
$scope.query = {query: "Test query"}
$scope.query = "Test query"
$scope.$digest()
assert.equal($scope.searchtext, $scope.query.query)
assert.equal($scope.searchtext, $scope.query)
it 'calls the given search function', ->
$scope.query = {query: "Test query"}
$scope.query = "Test query"
$scope.$digest()
$element.trigger('submit')
sinon.assert.calledWith($scope.update, "Test query")
......@@ -167,7 +166,7 @@ describe 'h.directives', ->
assert($scope.clear.called)
it 'clears the search-bar', ->
$scope.query = {query: "Test query"}
$scope.query = "Test query"
$scope.$digest()
$element.find('.simple-search-clear').click()
assert.equal($scope.searchtext, '')
......@@ -177,7 +176,7 @@ describe 'h.directives', ->
assert.include($form.prop('className'), 'simple-search-inactive')
it 'removes the class from the form when there is an input value', ->
$scope.query = {query: "Test query"}
$scope.query = "Test query"
$scope.$digest()
$form = $element.find('.simple-search-form')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment