diaspora/spec/models/bookmark_spec.rb
2010-06-14 20:20:19 -07:00

16 lines
No EOL
471 B
Ruby

require File.dirname(__FILE__) + '/../spec_helper'
describe Bookmark do
it "should have a link" do
bookmark = Bookmark.new
bookmark.valid?.should be false
bookmark.link = "http://angjoo.com/"
bookmark.valid?.should be true
end
it "should add an owner if none is present" do
User.create(:email => "bob@aol.com", :password => "big bux")
n = Bookmark.create(:link => "http://www.validurl.com/")
n.owner.should == "bob@aol.com"
end
end