 
         runs ->
           expect(tabBar.tabForItem(imageView)).toExist()
-          expect($(tabBar.tabForItem(imageView)).find('.title')).toHaveClass 'temp'
+          expect($(tabBar.tabForItem(imageView)).find('.title')).not.toHaveClass 'temp'
 
     describe "when double clicking a file in the tree view", ->
       it "makes the tab for that file permanent", ->

      expect(workspaceElement.querySelectorAll('.pane > .tab-bar').length).toBe 0

    it "serializes preview tab state", ->
      atom.config.set('tabs.usePreviewTabs', true)

      waitsForPromise ->
        atom.workspace.open('sample.txt')

      runs ->
        expect(workspaceElement.querySelectorAll('.tab.preview-tab .title').length).toBe 1

          expect($(tabBar2.tabForItem(pane2.getActiveItem())).find('.title')).not.toHaveClass 'temp'

    describe "when a non-text file is opened", ->
      it "opens a permanent tab", ->
        imageView = null
        waitsForPromise ->
          atom.workspace.open('sample.png').then (o) ->
