From bae625a89445aba72fbea13732c37b6e73466739 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 9 Jun 2014 14:03:53 -0700 Subject: [PATCH] Add spec for when lines become foldable --- spec/editor-component-spec.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 336326fd9..b39f657b6 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -329,6 +329,15 @@ describe "EditorComponent", -> expect(lineNumberHasClass(5, 'foldable')).toBe true expect(lineNumberHasClass(6, 'foldable')).toBe false + it "updates the foldable class on a line number that becomes foldable", -> + expect(lineNumberHasClass(11, 'foldable')).toBe false + + editor.getBuffer().insert([11, 44], '\n fold me') + expect(lineNumberHasClass(11, 'foldable')).toBe true + + editor.undo() + expect(lineNumberHasClass(11, 'foldable')).toBe false + it "adds, updates and removes the folded class on the correct line number nodes", -> editor.foldBufferRow(4) expect(lineNumberHasClass(4, 'folded')).toBe true