         expect(result[0].id).to.be.equal(1)
         expect(result[0].count).to.be.equal(5)
         expect(result[0].type).to.be.equal(type)
-    )
 
-    it "Generate filters from tags list", inject(($gmFilters) ->
+    it "Generate filters from tags list",  ->
         data = [["tag1",5], ["tag2",6]]
         result = $gmFilters.generateFiltersFromTagsList(data)
 

        expect(result[0].id).to.be.equal("tag1")
        expect(result[0].count).to.be.equal(5)
        expect(result[0].type).to.be.equal("tags")
    )

    it "Generate filters from users list", inject(($gmFilters) ->
        constants = {
            1: {name: "Foo"}
            2: {name: "Bar"}

beforeEach(module('taiga.services.filters'))

describe "$gmFilters", ->

    $rootScope = null
    $gmFilters = null

    beforeEach(inject((_$rootScope_, _$gmFilters_) ->
        $rootScope = _$rootScope_
        $gmFilters = _$gmFilters_
    ))


    it "Check if filter is selected",  ->
        tag = {id:1, name: "foo", type: "bar"}
        $gmFilters.selectFilter(1, "ns1", tag)
        expect($gmFilters.isFilterSelected(1, "ns1", tag)).to.be.true

    it "Check unselect filter", ->
        tag = {id:1, name: "foo", type: "bar"}
        $gmFilters.selectFilter(1, "ns1", tag)
        $gmFilters.unselectFilter(1, "ns1", tag)

        expect($gmFilters.isFilterSelected(1, "ns1", tag)).to.be.false

    it "Convert tag to key as text", ->
        tag = {id:1, name: "foo", type: "bar"}
        expect($gmFilters.filterToText(tag)).to.be.equal("1:bar")

    it "Get selected filters", ->
        tag1 = {id:1, name: "foo1", type: "bar"}
        tag2 = {id:2, name: "foo2", type: "bar"}

