mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 17:54:59 -04:00
Merge pull request #763 from CjayBillones/refactor-spec-helpers
Refactor spec/helpers
This commit is contained in:
@@ -3,12 +3,10 @@ require 'rails_helper'
|
||||
describe NotificationsHelper do
|
||||
describe "reply_link" do
|
||||
|
||||
before(:each) do
|
||||
@member = FactoryGirl.create(:member)
|
||||
end
|
||||
let(:member) { FactoryGirl.create(:member) }
|
||||
|
||||
it "replies to PMs with PMs" do
|
||||
notification = FactoryGirl.create(:notification, :recipient_id => @member.id, :post_id => nil)
|
||||
notification = FactoryGirl.create(:notification, :recipient_id => member.id, :post_id => nil)
|
||||
subject = "Re: " + notification.subject
|
||||
|
||||
link = helper.reply_link(notification)
|
||||
@@ -17,7 +15,7 @@ describe NotificationsHelper do
|
||||
end
|
||||
|
||||
it "replies to post comments with post comments" do
|
||||
notification = FactoryGirl.create(:notification, :recipient_id => @member.id)
|
||||
notification = FactoryGirl.create(:notification, :recipient_id => member.id)
|
||||
|
||||
link = helper.reply_link(notification)
|
||||
link.should_not be_nil
|
||||
|
||||
Reference in New Issue
Block a user