Sha256: 55d8d3fb1b27d4e3a3c67b2eaec28d48ab81fe56d38833e3bc451f42125ab348

Contents?: true

Size: 790 Bytes

Versions: 4

Compression:

Stored size: 790 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/edit" 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
    expect(view).to render_template("admin/field_groups/edit")
    expect(rendered).to have_text("crm.show_form('#{dom_id(field_group, :edit)}')")
    expect(rendered).to have_text("$('##{dom_id(field_group, :edit)}').html")
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 spec/views/admin/field_groups/edit.js.haml_spec.rb
fat_free_crm-0.14.1 spec/views/admin/field_groups/edit.js.haml_spec.rb
fat_free_crm-0.14.0 spec/views/admin/field_groups/edit.js.haml_spec.rb
reduced_fat_crm-0.14.0 spec/views/admin/field_groups/edit.js.haml_spec.rb