Sha256: 42b4cfc671c057e4fd5adb4339817c5f24352a4590afcff18ca894cc23131d66

Contents?: true

Size: 1.21 KB

Versions: 7

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true

# 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
    assign(:users, [current_user])
    assign(:comment, Comment.new)
    assign(:lead, build_stubbed(: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

7 entries across 7 versions & 1 rubygems

Version Path
fat_free_crm-0.20.1 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.20.0 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.19.2 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.19.0 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.18.2 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.18.1 spec/views/leads/_sidebar_show.haml_spec.rb
fat_free_crm-0.18.0 spec/views/leads/_sidebar_show.haml_spec.rb