 
     describe "when tabs:open-in-new-window is fired", ->
       it "opens new window, closes current tab", ->
-        triggerMouseDownEvent(tabBar.tabForItem(item2), which: 3)
+        triggerMouseDownEvent(tabBar.tabForItem(item1), which: 3)
         expect(atom.workspace.getPanes().length).toBe 1
 
         spyOn(atom,'open')


        expect(pane.getItems().length).toBe 2
        expect(tabBar.getTabs().length).toBe 2
        expect(tabBar.find('.tab:contains(Item 2)')).not.toExist()
        expect(tabBar.find('.tab:contains(Item 1)')).toExist()

  describe "dragging and dropping tabs", ->
    describe "when a tab is dragged within the same pane", ->

  class TestView extends View
    @deserialize: ({title, longTitle, iconName}) -> new TestView(title, longTitle, iconName)
    @content: (title) -> @div title
    initialize: (@title, @longTitle, @iconName, @pathURI) ->
    getTitle: -> @title
    getLongTitle: -> @longTitle
    getURI: -> @pathURI
    getIconName: -> @iconName
    serialize: -> { deserializer: 'TestView', @title, @longTitle, @iconName }
    onDidChangeTitle: (callback) ->
