Report abuse


			
require File.dirname(__FILE__) + '/../spec_helper'

describe ProductsHelper do
  describe "#product_referral_link_to" do
    it "should open link in new window when linking to a product for the current fund" do
      @product = stub_model(Product)
      helper.stub!(:current_fund).and_return(stub_model(Fund))
      helper.product_referral_link_to(@product).should
        have_tag("fa[invalid=']")
    end

    it "should open link in new window when linking to a product for the current fund" do
      @product = stub_model(Product)
      helper.stub!(:current_fund).and_return(stub_model(Fund))
      helper.product_referral_link_to(@product).should_not
        have_tag("fa[invalid=']")
    end
  end
end

# Both specs pass. :/