fix build
This commit is contained in:
parent
60b272b243
commit
2ad74d397c
2 changed files with 5 additions and 4 deletions
|
|
@ -37,6 +37,7 @@ class Person
|
|||
before_destroy :remove_all_traces
|
||||
before_validation :clean_url
|
||||
validates_presence_of :url, :profile, :serialized_public_key
|
||||
validates_uniqueness_of :diaspora_handle, :case_sensitive => false
|
||||
#validates_format_of :url, :with =>
|
||||
# /^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ describe Person do
|
|||
describe "vaild url" do
|
||||
it 'should allow for https urls' do
|
||||
person = Factory.create(:person, :url => "https://example.com")
|
||||
person.valid?.should == true
|
||||
person.should be_valid
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -51,12 +51,12 @@ describe Person do
|
|||
describe 'validation' do
|
||||
it 'is unique' do
|
||||
person_two = Factory.build(:person, :diaspora_handle => @person.diaspora_handle)
|
||||
person_two.valid?.should be_false
|
||||
person_two.should_not be_valid
|
||||
end
|
||||
|
||||
it 'is case insensitive' do
|
||||
person_two = Factory.build(:person, :url => @person.url.upcase)
|
||||
person_two.valid?.should be_false
|
||||
person_two = Factory.build(:person, :diaspora_handle => @person.diaspora_handle.upcase)
|
||||
person_two.should_not be_valid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue