Skip to content

Commit

Permalink
Client model modified.
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Hanses committed Feb 4, 2012
1 parent cc815ce commit b170490
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/models/client.rb
@@ -1,6 +1,5 @@
class Client < ActiveRecord::Base
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
validates :firstname, :presence => true
validates :lastname, :presence => true
validates :firstname, :lastname, :presence => true

end
2 changes: 1 addition & 1 deletion spec/models/client_spec.rb
Expand Up @@ -39,7 +39,7 @@
client.should_not be_valid
end

it "last == nil, then client is not valid" do
it "lastname == nil, then client is not valid" do
client = Client.new(@attr.merge(:lastname => nil))
client.should_not be_valid
end
Expand Down

0 comments on commit b170490

Please sign in to comment.