Sha256: 4a3ea400578f5ad5bcc732783e9b5f56b07f29ff423e17f853526f5f259e9253
Contents?: true
Size: 1.35 KB
Versions: 7
Compression:
Stored size: 1.35 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 'spec_helper' describe "/accounts/show" do include AccountsHelper before do login @account = create(:account, id: 42, contacts: [create(:contact)], opportunities: [create(:opportunity)]) assign(:account, @account) assign(:users, [current_user]) assign(:comment, Comment.new) assign(:timeline, [create(:comment, commentable: @account)]) # controller#controller_name and controller#action_name are not set in view specs allow(view).to receive(:template_for_current_view).and_return(nil) end it "should render account landing page" do render expect(view).to render_template(partial: "comments/_new") expect(view).to render_template(partial: "shared/_timeline") expect(view).to render_template(partial: "shared/_tasks") expect(view).to render_template(partial: "contacts/_contact") expect(view).to render_template(partial: "opportunities/_opportunity") expect(rendered).to have_tag("div[id=edit_account]") end end
Version data entries
7 entries across 7 versions & 1 rubygems