         expect(mocks.locationService.search.callCount).to.be.equal(1)
         expect(mocks.locationService.url.calledWith("/login")).to.be.true
         expect(mocks.locationService.search.calledWith({next: encodeURIComponent(nextUrl)})).to.be.true
+        expect(vm.publicRegisterEnabled).to.be.true
 
     it "navigation bar register", () ->
         mocks.navUrls.resolve.withArgs("register").returns("/register")

        expect(mocks.locationService.search.callCount).to.be.equal(1)
        expect(mocks.locationService.url.calledWith("/register")).to.be.true
        expect(mocks.locationService.search.calledWith({next: encodeURIComponent(nextUrl)})).to.be.true


        provide.value "$tgLocation", mocks.locationService

    _mocksConfig = () ->
        mocks.config =  Immutable.fromJS({
            publicRegisterEnabled: true
        })

        provide.value "$tgConfig", mocks.config

    _mockTgNavUrls = () ->
        mocks.navUrls = {
            resolve: sinon.stub()
