Sha256: 2e091ed27048d64e768502f27858ec783d82a5ac2c5e4e39f3428286bbf6314e
Contents?: true
Size: 1.06 KB
Versions: 4
Compression:
Stored size: 1.06 KB
Contents
require File.join(File.dirname(__FILE__), %w[.. spec_helper]) require 'capybara' require 'capybara/dsl' require File.join(File.dirname(__FILE__), %w[.. ui_utils mission_util]) include Capybara include MissionUtil describe 'Sessions' do before( :all ) do Capybara.default_driver = :selenium @url = "http://localhost:4567/" end it "should login correctly" do visit( @url ) login( @url, 'admin', 'admin', @url + 'mission' ) log_out # within( "//form[@id='login']" ) do # fill_in 'Login' , :with => 'admin' # fill_in 'Password', :with => 'admin' # end # click_button 'Log In' # current_url.should == @url + "mission" # click_link 'log out' end it "should complain for invalid credentials" do visit( @url ) login( @url, 'fernand', 'oh dear', @url ) # within( "//form[@id='login']" ) do # fill_in 'Login' , :with => 'fernand' # fill_in 'Password', :with => 'fuck' # end # click_button 'Log In' # current_url.should == @url page.should have_css( 'div.flash_error' ) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
wackamole-0.1.4 | spec/ui/session_spec.rb |
wackamole-0.1.3 | spec/ui/session_spec.rb |
wackamole-0.1.2 | spec/ui/session_spec.rb |
wackamole-0.0.9 | spec/ui/session_spec.rb |