A buffer with no path sets document.title to 'untitled'

This commit is contained in:
Corey Johnson
2012-04-04 11:10:02 -07:00
parent 8d05802290
commit 2e9bef04a9
2 changed files with 10 additions and 6 deletions

View File

@@ -366,3 +366,8 @@ describe "RootView", ->
editor1.buffer.setPath("should-not-be-title.txt")
expect(document.title).toBe "second.txt"
it "sets title to 'untitled' when buffer's path is null", ->
editor = rootView.activeEditor()
editor.setBuffer(new Buffer())
expect(document.title).toBe "untitled"