Sha256: 0e6840c5b426f6e90aac198f30f2f85763a8c06180c5df8c1adea95ec3d61a49

Contents?: true

Size: 663 Bytes

Versions: 5

Compression:

Stored size: 663 Bytes

Contents

//Testing the controller to make sure it gets properly attached to debug views

QUnit.test("when if_controller_init is called with a view that has the debug flag on, it uses the DebugController", function(assert) {
  //Setup prototypes html
  $("body").append("<div id='prototypes'></div>")
  if_init_view("my_test_view", {}, 1, ["main", "content"]);

  //Create a controller that belongs to a debug view (it has data-debug='1')
  if_controller_init(0, 1, "my_test_controller", {});

  //Uses DebugController
  assert.equal(cinstances[0].constructor, DebugController, "")

  //Has the correct name
  assert.equal(cinstances[0].name, "my_test_controller", "")
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flok-0.0.19 app/drivers/chrome/spec/spec/controller_debug_spec.js
flok-0.0.18 app/drivers/chrome/spec/spec/controller_debug_spec.js
flok-0.0.17 app/drivers/chrome/spec/spec/controller_debug_spec.js
flok-0.0.16 app/drivers/chrome/spec/spec/controller_debug_spec.js
flok-0.0.14 app/drivers/chrome/spec/spec/controller_debug_spec.js