Sha256: ead7df654e58b92fcf4aa8cee1c2c71ed566fac5a342e1273e93863c6945ffc7

Contents?: true

Size: 894 Bytes

Versions: 4

Compression:

Stored size: 894 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/new" do

  before do
    login_and_assign(:admin => true)
    assign(:field_group, field_group)
  end

  let(:field_group) { FactoryGirl.create(:field_group, :label => 'test') }

  it "renders javascript" do
    render
    view.should render_template("admin/field_groups/new")
    rendered.should have_text("crm.flick('empty', 'toggle')")
    rendered.should have_text("crm.flip_form('#{field_group.klass_name.downcase}_create_field_group')")
    rendered.should have_text("$('##{field_group.klass_name.downcase}_create_field_group').html")
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fat_free_crm-0.13.6 spec/views/admin/field_groups/new.js.haml_spec.rb
fat_free_crm-0.13.5 spec/views/admin/field_groups/new.js.haml_spec.rb
fat_free_crm-0.13.4 spec/views/admin/field_groups/new.js.haml_spec.rb
fat_free_crm-0.13.3 spec/views/admin/field_groups/new.js.haml_spec.rb