                 $confirm: confirmMock
             })
             httpBackend = $httpBackend
-            httpBackend.whenGET(APIURL+"/locales/en/app.json").respond(200, {})
-            httpBackend.whenGET(APIURL+"/sites").respond(200, {test: "test"})
+            httpBackend.whenGET("#{APIURL}/sites").respond(200, {test: "test"})
             httpBackend.whenGET("#{APIURL}/resolver?project=test").respond(200, {project: 1})
             httpBackend.whenGET("#{APIURL}/projects/1?").respond(200, FIXTURES.project)
             httpBackend.flush()


        it "should create on success", ->
            sinon.spy(ctrl.gmFlash, "error")
            httpBackend.expectPOST(APIURL+"/userstory-statuses?", {
                         project: FIXTURES.project.id, name: "test"}).respond(202, {test: "test"})
            httpBackend.expectGET(APIURL+"/userstory-statuses?project=1").respond(200, [{
                                               project: FIXTURES.project.id, name: "test"}])

            ctrl.openForm()


        it "should allow to save resorted", inject ($model) ->
            itemList = [{id: 1, order: 2}, {id: 2, order: 1}, {id: 3, order: 3}]
            modelList = _.map(itemList, (o) -> $model.make_model("choices/issue-types", o))

            httpBackend.expectPOST("#{APIURL}/issue-types/bulk_update_order",
                    {project: FIXTURES.project.id, bulk_issue_types: [[1,0],[2,1],[3,2]]}).respond(200)

            promise = ctrl.sortableOnUpdate(modelList)
            httpBackend.flush()

            promise.should.be.fulfilled.then =>
                expect(ctrl.scope[ctrl.model]).to.be.equal(modelList)


    describe "PrioritiesAdminController", ->
