Sha256: e7301a3f018aeeb345baffcb951c08a4f9da4e332da463d3bd263b6a9fba6c84

Contents?: true

Size: 746 Bytes

Versions: 1

Compression:

Stored size: 746 Bytes

Contents

#= require "jquery"
#= require "jax/controller-select"

describe "The select box in the dev suite runtime", ->
  select = null
  
  beforeEach ->
    Jax.routes.clear()
    Jax.views.push 'welcome/index', -> 1
    Jax.Controller.create "Welcome", index: -> 1
    select = document.createElement "select"
    _controller_select_fill select
  
  it "should contain the 'Welcome' controller", ->
    expect(select.options[0].value).toEqual("welcome")

  describe "clicked", ->
    beforeEach ->
      select.webgl_context = SPEC_CONTEXT
      select.selectedIndex = 0
      $(select).trigger("change");
    
    it "should redirect to the selected controller", ->
      expect(SPEC_CONTEXT.current_controller.getControllerName()).toEqual("Welcome")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jax-2.0.0 spec/javascripts/suite/controller_select_spec.js.coffee