diff --git a/app/views/bookmarks/_bookmark.html.haml b/app/views/bookmarks/_bookmark.html.haml
index f5f9b8f4e..88a7b82f7 100644
--- a/app/views/bookmarks/_bookmark.html.haml
+++ b/app/views/bookmarks/_bookmark.html.haml
@@ -4,7 +4,10 @@
%b shared a link
%br
= post.title
- = link_to post.link.to_s, post.link
+ /- (foo = post.link.to_s)
+ /- (bar = post.link)
+ %a{:href => "#{post.link}"}
+ = post.link
%div.time= link_to "#{time_ago_in_words(post.updated_at)} ago", bookmark_path(post)
- if mine?(post)
= link_to 'Destroy', bookmark_path(post), :confirm => 'Are you sure?', :method => :delete
diff --git a/app/views/shared/_post.html.haml b/app/views/shared/_post.html.haml
deleted file mode 100644
index 0ec4bc41e..000000000
--- a/app/views/shared/_post.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%ul
- %h3= link_to post.class, object_path(post)
- - for field in object_fields(post)
- %li= "#{field}: #{post.attributes[field]}"
-
diff --git a/app/views/status_messages/_status_message.html.haml b/app/views/status_messages/_status_message.html.haml
index 386372057..bfe97c678 100644
--- a/app/views/status_messages/_status_message.html.haml
+++ b/app/views/status_messages/_status_message.html.haml
@@ -5,7 +5,7 @@
%div.time
= "#{time_ago_in_words(post.updated_at)} ago"
- if mine?(post)
- /= link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
+ = link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
diff --git a/spec/controllers/bookmarks_controller_spec.rb b/spec/controllers/bookmarks_controller_spec.rb
index ba62b588c..0259c32d1 100644
--- a/spec/controllers/bookmarks_controller_spec.rb
+++ b/spec/controllers/bookmarks_controller_spec.rb
@@ -3,6 +3,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
describe BookmarksController do
before do
#TODO(dan) Mocking Warden; this is a temp fix
+
request.env['warden'] = mock_model(Warden, :authenticate? => @user, :authenticate! => @user)
@bob = Factory.build(:user)
@bookmark = Factory.build(:bookmark)
@@ -31,7 +32,7 @@ describe BookmarksController do
it "update action should redirect when model is valid" do
#TODO(dan) look into why we need to create a new bookmark object here
Bookmark.any_instance.stubs(:valid?).returns(true)
- n = Factory.create(:bookmark, :link => "http://hotub.com")
+ n = Factory.create(:bookmark, :link => "http://hotub.com/")
n.save
put :update, :id => Bookmark.first.id
response.should redirect_to(bookmark_url(assigns[:bookmark]))
diff --git a/spec/lib/common_spec.rb b/spec/lib/common_spec.rb
index ec9433119..bc5bdf41d 100644
--- a/spec/lib/common_spec.rb
+++ b/spec/lib/common_spec.rb
@@ -39,7 +39,7 @@ describe Diaspora do
describe "body" do
before do
- @post = Factory.create(:post)
+ @post = Factory.create(:status_message)
end
it "should add the following methods to Post on inclusion" do
@@ -71,7 +71,7 @@ describe Diaspora do
it "should check that it does not send a friends post to an owners friends" do
Post.stub(:build_xml_for).and_return(true)
Post.should_not_receive(:build_xml_for)
- Factory.create(:post, :owner => "nottheowner@post.com")
+ Factory.create(:status_message, :owner => "nottheowner@post.com")
end
it "should ensure one url is created for every friend" do
diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb
index 79457ab03..f8908e23e 100644
--- a/spec/models/post_spec.rb
+++ b/spec/models/post_spec.rb
@@ -10,7 +10,9 @@ describe Post do
describe 'defaults' do
before do
- @post = Factory.create(:post, :owner => nil, :source => nil, :snippet => nil)
+ WebSocket.stub!(:update_clients)
+ @post = Factory.create(:post, :owner => nil, :source => nil, :snippet => nil)
+
end
it "should add an owner if none is present" do