Sha256: 2c331611c0efc3e7062260f27a835dd56caafc758e6de22b3c356bb480f2e8d0

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 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/destroy" do
  include AccountsHelper

  before do
    login_and_assign
    assign(:account, @account = FactoryGirl.create(:account))
    assign(:accounts, [ @account ].paginate)
    assign(:account_category_total, Hash.new(1))
    render
  end

  it "should blind up destroyed account partial" do
    rendered.should include(%Q/$("account_#{@account.id}").visualEffect("blind_up"/)
  end

  it "should update accounts pagination" do
    rendered.should have_rjs("paginate")
  end

  it "should update accounts sidebar" do
    rendered.should have_rjs("sidebar") do |rjs|
      with_tag("div[id=filters]")
      with_tag("div[id=recently]")
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fat_free_crm-0.12.3 spec/views/accounts/destroy.rjs_spec.rb
fat_free_crm-0.12.2 spec/views/accounts/destroy.rjs_spec.rb
fat_free_crm-0.12.1 spec/views/accounts/destroy.rjs_spec.rb
fat_free_crm-0.12.0 spec/views/accounts/destroy.rjs_spec.rb