Sha256: f57ee3484eff4059c9523ddc0f600fc892bd617a519c16f568a8b3dc684cc7a3

Contents?: true

Size: 1.42 KB

Versions: 11

Compression:

Stored size: 1.42 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("../../acceptance_helper.rb", __FILE__)

feature 'Users tab', %q{
  In order to increase customer satisfaction
  As an administrator
  I want to manage users
} do

  before(:each) do
   do_login(:first_name => 'Captain', :last_name => 'Kirk', :admin => true)
  end

  scenario 'should create a new user', :js => true  do
    FactoryGirl.create(:group, :name => "Superheroes")
    visit admin_users_path
    click_link 'Create User'
    page.should have_selector('#user_username', :visible => true)
    fill_in 'user_username', :with => 'captainthunder'
    fill_in 'user_email', :with => 'lightning@example.com'
    fill_in 'user_first_name', :with => 'Captain'
    fill_in 'user_last_name', :with => 'Thunder'
    fill_in 'user_title', :with => 'Chief'
    fill_in 'user_company', :with => 'Weather Inc.'
    chosen_select('Superheroes', :from => 'user_group_ids')

    click_button 'Create User'
    find('#users').should have_content('Captain Thunder')
    find('#users').should have_content('Weather Inc.')
    find('#users').should have_content('Superheroes')
    find('#users').should have_content('lightning@example.com')

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fat_free_crm-0.13.6 spec/features/admin/users_spec.rb
fat_free_crm-0.13.5 spec/features/admin/users_spec.rb
fat_free_crm-0.13.4 spec/features/admin/users_spec.rb
fat_free_crm-0.13.3 spec/features/admin/users_spec.rb
fat_free_crm-0.13.2 spec/features/admin/users_spec.rb
fat_free_crm-0.12.3 spec/features/admin/users_spec.rb
fat_free_crm-0.12.2 spec/features/admin/users_spec.rb
fat_free_crm-0.13.1 spec/features/admin/users_spec.rb
fat_free_crm-0.12.1 spec/features/admin/users_spec.rb
fat_free_crm-0.13.0 spec/features/admin/users_spec.rb
fat_free_crm-0.12.0 spec/features/admin/users_spec.rb