 
   describe "with attached commit version", ->
     it "correctly sets the feedURL", ->
-      m = new AutoUpdateManager("3.222.1-abc", @config, @specMode)
+      m = new AutoUpdateManager("3.222.1-abc", @config, @specMode, @databaseReader)
       spyOn(m, "setupAutoUpdater")
 
       {query} = url.parse(m.feedURL, true)

    @nylasIdentityId = null
    @accounts = [{email_address: 'ben@nylas.com'},{email_address: 'mark@nylas.com'}]
    @specMode = true
    @config =
      set: jasmine.createSpy('config.set')
      get: (key) =>

  describe "when an update identity is already set", ->
    it "should send it and not save any changes", ->
      @nylasIdentityId = "test-nylas-id"
      m = new AutoUpdateManager("3.222.1", @config, @specMode, @databaseReader)
      spyOn(m, "setupAutoUpdater")
      {query} = url.parse(m.feedURL, true)
      expect(query.id).toEqual(@nylasIdentityId)

  describe "when an update identity is added", ->
    it "should update the feed URL", ->
      m = new AutoUpdateManager("3.222.1", @config, @specMode, @databaseReader)
      spyOn(m, "setupAutoUpdater")
      {query} = url.parse(m.feedURL, true)
      expect(query.id).toEqual('anonymous')
      @nylasIdentityId = '1'
      m.updateFeedURL()
      {query} = url.parse(m.feedURL, true)
      expect(query.id).toEqual(@nylasIdentityId)
