mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Remove spec now covered in git spec
This commit is contained in:
@@ -2414,37 +2414,6 @@ describe "EditorView", ->
|
||||
expect(editor.getCursor().getScreenPosition().row).toBe(0)
|
||||
expect(editorView.getFirstVisibleScreenRow()).toBe(0)
|
||||
|
||||
describe ".checkoutHead()", ->
|
||||
[filePath] = []
|
||||
|
||||
beforeEach ->
|
||||
workingDirPath = temp.mkdirSync('atom-working-dir')
|
||||
fs.copySync(path.join(__dirname, 'fixtures', 'git', 'working-dir'), workingDirPath)
|
||||
fs.renameSync(path.join(workingDirPath, 'git.git'), path.join(workingDirPath, '.git'))
|
||||
atom.project.setPath(workingDirPath)
|
||||
filePath = atom.project.resolve('file.txt')
|
||||
|
||||
waitsForPromise ->
|
||||
atom.workspace.open(filePath).then (o) -> editor = o
|
||||
|
||||
runs ->
|
||||
editorView.edit(editor)
|
||||
|
||||
it "restores the contents of the editor view to the HEAD revision", ->
|
||||
editor.setText('')
|
||||
editor.save()
|
||||
|
||||
fileChangeHandler = jasmine.createSpy('fileChange')
|
||||
editor.getBuffer().file.on 'contents-changed', fileChangeHandler
|
||||
|
||||
editorView.checkoutHead()
|
||||
|
||||
waitsFor "file to trigger contents-changed event", ->
|
||||
fileChangeHandler.callCount > 0
|
||||
|
||||
runs ->
|
||||
expect(editor.getText()).toBe('undefined')
|
||||
|
||||
describe ".pixelPositionForBufferPosition(position)", ->
|
||||
describe "when the editor view is detached", ->
|
||||
it "returns top and left values of 0", ->
|
||||
|
||||
Reference in New Issue
Block a user