Skip to content

Instantly share code, notes, and snippets.

@simonmorley
Created December 4, 2012 16:51
Show Gist options
  • Save simonmorley/4206099 to your computer and use it in GitHub Desktop.
Save simonmorley/4206099 to your computer and use it in GitHub Desktop.
Example test for bavan
it "should display correct fields for Clickthrough Access", :js => true do
click_link 'Access Settings'
select("Clickthrough", :from => "location_access_type")
page.should have_content "UPDATE YOUR ACCESS SETTINGS"
page.should_not have_content "Access Password"
page.should_not have_content "Auto email password"
page.should have_content "Session Timeout"
page.should have_content "Max Users"
page.should have_content "Speed Limits"
page.should have_content "Idle Timeout"
fill_in("idle_timeout", :with => 33 )
fill_in("session_timeout", :with => 22 )
fill_in("max_users", :with => 99 )
click_button 'Update'
find_field('session_timeout').value.should eq "22"
find_field('idle_timeout').value.should eq "33"
find_field('max_users').value.should eq "99"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment