diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml
index 44b408ce0..08c00121b 100644
--- a/app/views/notifications/index.html.haml
+++ b/app/views/notifications/index.html.haml
@@ -13,9 +13,9 @@
%tr
%td
- if n.read
- = link_to n.sender
+ = link_to n.sender, member_path(n.sender)
- else
- %strong= link_to n.sender
+ %strong= link_to n.sender, member_path(n.sender)
%td
- if n.read
= link_to n.subject, notification_path(n)
diff --git a/spec/views/notifications/index.html.haml_spec.rb b/spec/views/notifications/index.html.haml_spec.rb
index e1513c81c..0e65dc93f 100644
--- a/spec/views/notifications/index.html.haml_spec.rb
+++ b/spec/views/notifications/index.html.haml_spec.rb
@@ -6,13 +6,17 @@ describe "notifications/index" do
controller.stub(:current_user) { @member }
@notification = FactoryGirl.create(:notification, :sender => @member, :recipient => @member)
assign(:notifications, [ @notification, @notification ])
+ render
end
it "renders a list of notifications" do
- render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "table"
assert_select "tr>td", :text => @notification.sender.to_s, :count => 2
assert_select "tr>td", :text => @notification.subject, :count => 2
end
+
+ it "links to sender's profile" do
+ assert_select "a", :href => member_path(@notification.sender)
+ end
end