Sha256: da336fbfe89d06756687e115ae2a93278a0bbe9e6e8baa1c3cef065fd812c226

Contents?: true

Size: 1.23 KB

Versions: 4

Compression:

Stored size: 1.23 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 "/accounts/show" do
  include AccountsHelper

  before do
    login_and_assign
    @account = FactoryGirl.create(:account, :id => 42,
      :contacts => [ FactoryGirl.create(:contact) ],
      :opportunities => [ FactoryGirl.create(:opportunity) ])
    assign(:account, @account)
    assign(:users, [ current_user ])
    assign(:comment, Comment.new)
    assign(:timeline, [ FactoryGirl.create(:comment, :commentable => @account) ])
  end

  it "should render account landing page" do
    render

    view.should render_template(:partial => "comments/_new")
    view.should render_template(:partial => "shared/_timeline")
    view.should render_template(:partial => "shared/_tasks")
    view.should render_template(:partial => "contacts/_contact")
    view.should render_template(:partial => "opportunities/_opportunity")

    rendered.should have_tag("div[id=edit_account]")
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fat_free_crm-0.12.3 spec/views/accounts/show.haml_spec.rb
fat_free_crm-0.12.2 spec/views/accounts/show.haml_spec.rb
fat_free_crm-0.12.1 spec/views/accounts/show.haml_spec.rb
fat_free_crm-0.12.0 spec/views/accounts/show.haml_spec.rb