Sha256: edef0b63cddd676470108121f0ace80b8554399b94bc944da7beaaa6cbdaa683

Contents?: true

Size: 574 Bytes

Versions: 3

Compression:

Stored size: 574 Bytes

Contents

require 'spec_helper'

describe FluffiesController, :type => :controller do
  before(:all) do
    @john    = User.create!   :admin => false
    @maria   = User.create!   :admin => false
    @admin   = User.create!   :admin => true
    @private = Entity.create! :name => 'ent1', :public => false
    @public  = Entity.create! :name => 'ent1', :public => true, :owner_id => @john.id
  end

  after(:all) do
    Entity.delete_all
  end

  it "accepts load_and_authorize_resource params" do
    User.mock @admin
    get :index

    assigns(:entities).count.should == 2
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
heimdallr-resource-1.0.3 spec/fluffies_spec.rb
heimdallr-resource-1.0.2 spec/fluffies_spec.rb
heimdallr-resource-1.0.1 spec/fluffies_spec.rb