Sha256: 665d5ce9c2ad61222b12a8a86aed28f112ea0c77a84b0ec65bb02ca96961a80f

Contents?: true

Size: 1.21 KB

Versions: 4

Compression:

Stored size: 1.21 KB

Contents

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

describe "/leads/_sidebar_show" do
  include LeadsHelper

  before do
    login_and_assign
    assign(:users, [current_user])
    assign(:comment, Comment.new)
    assign(:lead, FactoryGirl.create(:lead,
                                     blog: 'http://www.blogger.com/home',
                                     linkedin: 'www.linkedin.com',
                                     twitter: 'twitter.com/account',
                                     facebook: ''))
  end

  it "should render working web presence links whether a protocol is provided or not" do
    render
    expect(rendered).to have_tag("a[href='http://www.blogger.com/home']")
    expect(rendered).to have_tag("a[href='http://www.linkedin.com']")
    expect(rendered).to have_tag("a[href='http://twitter.com/account']")
    expect(rendered).not_to have_tag("a[href='http://www.facebook/profile']")
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.14.1 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.14.0 spec/views/leads/_sidebar_show.haml_spec.rb
reduced_fat_crm-0.14.0 spec/views/leads/_sidebar_show.haml_spec.rb