Sha256: 9879e87d22732c9395b6836084baaf58ef1596cce89b480bea65b8cf158a8bad

Contents?: true

Size: 840 Bytes

Versions: 9

Compression:

Stored size: 840 Bytes

Contents

require 'spec_helper'

describe UsersController, :type => :controller do

  it "should raise an error if the checked power is not given" do
    expect { get :update, :id => '1' }.to raise_error(Consul::Powerless)
  end

  it 'should allow to map actions to another power using the :map option' do
    expect { get :show, :id => '1' }.to_not raise_error
  end


  #describe '.power_name_for_action' do
  #
  #  it 'should return the name of the power for the given action (feature request from devolute)' do
  #    UsersController.power_name_for_action(:show).should == :always_true
  #    UsersController.power_name_for_action('show').should == :always_true
  #    UsersController.power_name_for_action(:update).should == :always_false
  #    UsersController.power_name_for_action('update').should == :always_false
  #  end
  #
  #end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
consul-0.12.2 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.12.1 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.12.0 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.11.2 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.11.1 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.11.0 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.10.2 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.10.1 spec/shared/consul/controllers/users_controller_spec.rb
consul-0.10.0 spec/shared/consul/controllers/users_controller_spec.rb