Sha256: e6e8d585c82344ad12ab4f349a58d19d404311fe0a6ddc957092462bf026cc3a
Contents?: true
Size: 998 Bytes
Versions: 15
Compression:
Stored size: 998 Bytes
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 'spec_helper' describe "admin/field_groups/destroy" do before do login_and_assign(admin: true) assign(:field_group, field_group) end let(:field_group) { FactoryGirl.build(:field_group) } it "renders destroy javascript" do allow(field_group).to receive(:destroyed?).and_return(true) render expect(view).to render_template("admin/field_groups/destroy") expect(rendered).to have_text("slideUp(250)") end it "renders 'not destroyed' javascript" do render expect(view).to render_template("admin/field_groups/destroy") expect(rendered).to have_text("Field Group could not be deleted") expect(rendered).to have_text("crm.flash('warning');") end end
Version data entries
15 entries across 15 versions & 2 rubygems