Sha256: 688e6032ed768aea85d35fca2a119789f9792a0cc161656ed87f6b3b6b522150

Contents?: true

Size: 872 Bytes

Versions: 4

Compression:

Stored size: 872 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 File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')

describe "admin/users/index" do
  before do
    login_and_assign
  end

  it "renders [admin/user] template with @users collection" do
    amy = FactoryGirl.create(:user)
    bob = FactoryGirl.create(:user)
    assign(:users, [ amy, bob ].paginate)

    render :template => 'admin/users/index', :formats => [:js]
    
    rendered.should have_rjs("users") do |rjs|
      with_tag("li[id=user_#{amy.id}]")
      with_tag("li[id=user_#{bob.id}]")
    end
    rendered.should have_rjs("paginate")
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fat_free_crm-0.12.3 spec/views/admin/users/index.rjs_spec.rb
fat_free_crm-0.12.2 spec/views/admin/users/index.rjs_spec.rb
fat_free_crm-0.12.1 spec/views/admin/users/index.rjs_spec.rb
fat_free_crm-0.12.0 spec/views/admin/users/index.rjs_spec.rb