Commit 28959973 by Prem Sichanugrist

Make it more obvious that the function is no-op

parent f71e54cc
...@@ -25,7 +25,7 @@ describe "CMS", -> ...@@ -25,7 +25,7 @@ describe "CMS", ->
describe "replaceView", -> describe "replaceView", ->
beforeEach -> beforeEach ->
@newView = jasmine.createSpy("newView") @newView = jasmine.createSpy("newView")
CMS.on "content.show", (@expectedView) => CMS.on("content.show", (@expectedView) =>)
CMS.replaceView(@newView) CMS.replaceView(@newView)
it "replace the views on the viewStack", -> it "replace the views on the viewStack", ->
...@@ -37,7 +37,7 @@ describe "CMS", -> ...@@ -37,7 +37,7 @@ describe "CMS", ->
describe "pushView", -> describe "pushView", ->
beforeEach -> beforeEach ->
@newView = jasmine.createSpy("newView") @newView = jasmine.createSpy("newView")
CMS.on "content.show", (@expectedView) => CMS.on("content.show", (@expectedView) =>)
CMS.pushView(@newView) CMS.pushView(@newView)
it "push new view onto viewStack", -> it "push new view onto viewStack", ->
...@@ -54,7 +54,7 @@ describe "CMS", -> ...@@ -54,7 +54,7 @@ describe "CMS", ->
describe "when there's no view on the viewStack", -> describe "when there's no view on the viewStack", ->
beforeEach -> beforeEach ->
CMS.viewStack = [@currentView] CMS.viewStack = [@currentView]
CMS.on "content.hide", => @eventTriggered = true CMS.on("content.hide", => @eventTriggered = true)
CMS.popView() CMS.popView()
it "trigger content.hide on CMS", -> it "trigger content.hide on CMS", ->
...@@ -64,7 +64,7 @@ describe "CMS", -> ...@@ -64,7 +64,7 @@ describe "CMS", ->
beforeEach -> beforeEach ->
@parentView = jasmine.createSpyObj("parentView", ["delegateEvents"]) @parentView = jasmine.createSpyObj("parentView", ["delegateEvents"])
CMS.viewStack = [@parentView, @currentView] CMS.viewStack = [@parentView, @currentView]
CMS.on "content.show", (@expectedView) => CMS.on("content.show", (@expectedView) =>)
CMS.popView() CMS.popView()
it "trigger content.show with the previous view on CMS", -> it "trigger content.show with the previous view on CMS", ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment