Sha256: 398b4290a4c3867aaf9b495892eb38888d3ec6b1f19798c8bcf092ea3d2fef63

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 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 "/campaigns/destroy" do
  before do
    login_and_assign
    assign(:campaign, @campaign = FactoryGirl.create(:campaign, :user => current_user))
    assign(:campaigns, [ @campaign ].paginate)
    assign(:campaign_status_total, Hash.new(1))
    render
  end

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

  it "should update Campaigns sidebar" do
    rendered.should have_rjs("sidebar") do |rjs|
      with_tag("div[id=recently]")
    end
    rendered.should include('$("filters").visualEffect("shake"')
  end

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

end

Version data entries

4 entries across 4 versions & 1 rubygems

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