Sha256: 5c3be86fcf2ea68d64141406ac29edca303634b00bc8d575c754394c26c27459

Contents?: true

Size: 878 Bytes

Versions: 15

Compression:

Stored size: 878 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/users/new" do
  before do
    login_and_assign(admin: true)
    assign(:user, User.new)
  end

  describe "new user" do
    it "shows [create user] form" do
      params[:cancel] = nil
      render

      expect(rendered).to include("$('#create_user').html")
    end
  end

  describe "cancel new user" do
    it "hides [create user] form" do
      params[:cancel] = "true"
      render

      expect(rendered).to include("crm.set_title('create_user', 'Users');")
      expect(rendered).to include("crm.flip_form('create_user');")
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.15.2 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.16.4 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.14.1 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.15.1 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.16.3 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.16.2 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.16.1 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.16.0 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.15.0 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.15.0.beta.2 spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.15.0.beta spec/views/admin/users/new.js.haml_spec.rb
fat_free_crm-0.14.0 spec/views/admin/users/new.js.haml_spec.rb
reduced_fat_crm-0.15.0.beta spec/views/admin/users/new.js.haml_spec.rb
reduced_fat_crm-0.14.0 spec/views/admin/users/new.js.haml_spec.rb