Commit 6ec9ed6f
Changed files (3)
app
models
spec
controllers
factories
app/models/user.rb
@@ -10,7 +10,7 @@ end
class User < ActiveRecord::Base
validates :name, :presence => true
- validates :website, :format => URI::regexp(%w(http https)), :presence => false
+ validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
#validates_with UrlValidation
has_many :authentications
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
spec/controllers/creations_controller_spec.rb
@@ -11,7 +11,6 @@ describe CreationsController do
end
before (:each) do
- puts "WEBSITE #{user.website}"
request.env['warden'] = mock(Warden, :authenticate => user, :authenticate! => user)
end
spec/factories/user.rb
@@ -4,6 +4,6 @@ FactoryGirl.define do
name 'mo'
email 'mo@cakeside.com'
password 'password'
- website 'cakeside.com'
+ website 'http://cakeside.com'
end
end