XSS Capybara spec added.

This commit is contained in:
chrismo
2013-09-27 16:58:33 -05:00
parent e0bca0139e
commit 269d5a0075
5 changed files with 62 additions and 22 deletions
+8
View File
@@ -0,0 +1,8 @@
def login(user)
visit '/'
within('.signup') do
fill_in 'email', :with => user.email
fill_in 'password', :with => user.clear_password
end
click_on 'Login'
end
+18
View File
@@ -0,0 +1,18 @@
class UserFixture
def self.reset_all_users
User.delete_all
Rails.application.load_seed
end
def self.normal_user
password = 'aoeuaoeu'
user = User.new(:first_name => 'Joe', :last_name => 'Schmoe',
:email => 'joe@schmoe.com', :password => password, :password_confirmation => password)
def user.clear_password
'aoeuaoeu'
end
user.build_benefits_data
user.save!
user
end
end