mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-26 18:56:06 -04:00
Merge pull request #169 from attlebish/fixsenderlink
Fixed link to sender profile in notifications
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user