Based on cane gem, removed tab indents and trailing blanks
This commit is contained in:
@@ -10,16 +10,15 @@ describe User do
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
end
|
||||
|
||||
it "can be instantiated" do
|
||||
Benefits.new.should be_an_instance_of(Benefits)
|
||||
end
|
||||
it "can be instantiated" do
|
||||
Benefits.new.should be_an_instance_of(Benefits)
|
||||
end
|
||||
|
||||
|
||||
it "name can be updated" do
|
||||
new_name = "Bobby"
|
||||
user = User.all.first
|
||||
user.first_name = new_name
|
||||
user.save!
|
||||
User.all.first.first_name.should == new_name
|
||||
end
|
||||
end
|
||||
it "name can be updated" do
|
||||
new_name = "Bobby"
|
||||
user = User.all.first
|
||||
user.first_name = new_name
|
||||
user.save!
|
||||
User.all.first.first_name.should == new_name
|
||||
end
|
||||
end
|
||||
|
||||
+21
-21
@@ -10,28 +10,28 @@ describe User do
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
end
|
||||
|
||||
it "can be instantiated" do
|
||||
User.new.should be_an_instance_of(User)
|
||||
end
|
||||
it "can be instantiated" do
|
||||
User.new.should be_an_instance_of(User)
|
||||
end
|
||||
|
||||
it "should require a email" do
|
||||
User.new(:email => "").should_not be_valid
|
||||
end
|
||||
it "should require a email" do
|
||||
User.new(:email => "").should_not be_valid
|
||||
end
|
||||
|
||||
it "should require valid email" do
|
||||
User.new(:email => "@gmail.com").should_not be_valid
|
||||
end
|
||||
it "should require valid email" do
|
||||
User.new(:email => "@gmail.com").should_not be_valid
|
||||
end
|
||||
|
||||
it "should require unique email" do
|
||||
user = User.all.first
|
||||
User.new(:email => user.email).should_not be_valid
|
||||
end
|
||||
it "should require unique email" do
|
||||
user = User.all.first
|
||||
User.new(:email => user.email).should_not be_valid
|
||||
end
|
||||
|
||||
it "name can be updated" do
|
||||
new_name = "Bobby"
|
||||
user = User.all.first
|
||||
user.first_name = new_name
|
||||
user.save!
|
||||
User.all.first.first_name.should == new_name
|
||||
end
|
||||
end
|
||||
it "name can be updated" do
|
||||
new_name = "Bobby"
|
||||
user = User.all.first
|
||||
user.first_name = new_name
|
||||
user.save!
|
||||
User.all.first.first_name.should == new_name
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
|
||||
# To use simplecov, do this: COVERAGE=true rake
|
||||
# To use simplecov, do this: COVERAGE=true rake
|
||||
require 'simplecov'
|
||||
SimpleCov.start if ENV["COVERAGE"]
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ feature 'xss' do
|
||||
fill_in 'user_password_confirmation', :with => @normal_user.clear_password
|
||||
end
|
||||
click_on 'Submit'
|
||||
|
||||
|
||||
sleep(1)
|
||||
|
||||
|
||||
visit "/users/#{@normal_user.user_id}/account_settings"
|
||||
|
||||
|
||||
pending(:if => verifying_fixed?) { find('#submit_button').value.should == 'RailsGoat h4x0r3d' }
|
||||
|
||||
|
||||
# might be nice to demonstrate posting cookie contents or somesuch, but
|
||||
# this at least shows the vulnerability still exists.
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user