       controller.addFilter 'color', 'Rojo'
 
       controller.refresh() # search wigh color: ['Azul', 'Rojo'] and brand: ['Nike']
+
+    it 'when removing terms filters, filters params change', (done) ->
+      controller = new doofinder.Controller client_mock, [widget_mock]
+      # make 1 search to refresh later
+      controller.search 'silla'
+      # add some filters
+      controller.addFilter 'color', 'Azul'
+      controller.addFilter 'brand', 'Nike'
+      controller.addFilter 'color', 'Rojo'
+      # refresh. we're not testing anything yet
+      controller.refresh()
+      # now remove some
+      controller.removeFilter 'color', 'Azul'
+      controller.removeFilter 'brand', 'Nike'
+      # those filters should be removed
+      client_mock.search = (query, params, cb) ->
+        params.filters.should.have.keys 'color', 'brand'
+        params.filters.color.should.be.eql ['Rojo']
+        params.filters.brand.should.be.empty
+        done()
+      # go!
+      controller.refresh()
+
+    it 'when adding range filters, filters params change', (done) ->
+      controller = new doofinder.Controller client_mock, [widget_mock]
+      controller.search 'silla'
+      client_mock.search = (query, params, cb) ->
+        params.filters.price.should.be.eql gt: 10
+        done()
+      controller.addFilter 'price', gt: 10
+      controller.refresh()
+
+    it 'when removing range filters, filters params change', (done) ->
+      controller = new doofinder.Controller client_mock, [widget_mock]
+      controller.search 'silla'
+      controller.addFilter 'price', gt: 10
+      controller.refresh()
+      controller.removeFilter 'price', lte: 5
+      client_mock.search = (query, params, cb) ->
+        params.filters.should.be.empty
+        done()
+      controller.refresh()
+
+  context ' pagination methods ', ->
+
+    beforeEach ()->
+      client_mock =
+        search: ()->
+        hit: ()->
+        hashid: mock.request.hashid
+
 
     it 'nextPage redo the search with next page', (done) ->
       controller = new doofinder.Controller client_mock, [widget_mock]

      controller = new doofinder.Controller client_mock, [widget_mock], {rpp: 11, filters: {color: ['Azul']}}
      controller.search 'silla'

    it 'when adding terms filters, filters params change', (done) ->
      # we need to make a search first in order to "refresh" it with
      # applied filters


      # first search
      controller.search 'silla'
