Files
railsgoat/spec/vulnerabilities/broken_auth_spec.rb
T
2016-04-14 17:34:27 -04:00

35 lines
877 B
Ruby

require 'spec_helper'
feature 'broken_auth' do
before do
UserFixture.reset_all_users
@normal_user = UserFixture.normal_user
end
scenario 'one' do
visit '/'
within('.signup') do
fill_in 'email', :with => @normal_user.email + 'not'
fill_in 'password', :with => @normal_user.clear_password
end
within('.actions') do
click_on 'Login'
end
pending if verifying_fixed?
expect(find('div#flash_notice').text).to eq("#{@normal_user.email}not doesn't exist!")
end
scenario 'two' do
visit '/'
within('.signup') do
fill_in 'email', :with => @normal_user.email
fill_in 'password', :with => @normal_user.clear_password + 'not'
end
within('.actions') do
click_on 'Login'
end
pending if verifying_fixed?
expect(find('div#flash_notice').text).to eq('Incorrect Password!')
end
end