Sha256: 5e302bbacf00cb0f6ca27950758516f8675bc32c21ae66a6c68e01e2988819c5

Contents?: true

Size: 639 Bytes

Versions: 4

Compression:

Stored size: 639 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe 'javascript events', :type => :request, :js => true do
  it "should fire the onReady event" do
    visit('/test/base')
    
    # this gets added onReady
    page.should have_selector('h1.ready')
  end
  
  it "should fire the onLoad event" do
    visit('/test/base')
    
    # this gets added onReady
    page.should have_selector('h1.load')
  end
  
  it "should fire the onReady event via AJAX" do
    visit('/test/empty')
    page.should have_no_selector('h1.ready')
    
    page.evaluate_script('jQuery.get("/test/base")')
    page.should have_selector('h1.ready')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
edifice-1.3.0 spec/javascript_event_spec.rb
edifice-1.2.0 spec/javascript_event_spec.rb
edifice-1.1.1 spec/javascript_event_spec.rb
edifice-1.1.0 spec/javascript_event_spec.rb