Sha256: 422c2edf01c3c6430c038bf82c8fc9291414bac07871ab1c1aecec173313002c
Contents?: true
Size: 756 Bytes
Versions: 1
Compression:
Stored size: 756 Bytes
Contents
require 'spec_helpers/boot' describe DummiesController do it 'should have default protector subject' do DummiesController.effective_protector_subject.should == :current_user end it 'restricts collections' do get :index first_dummy = assigns(:dummies).first! first_dummy.protector_subject?.should be_true first_dummy.protector_subject.should == 'default_user' end it 'restricts resources' do get :show, :id => 1 assigns(:dummy).protector_subject?.should be_true assigns(:dummy).protector_subject.should == 'default_user' end it 'restricts newly created resources' do get :new assigns(:dummy).protector_subject?.should be_true assigns(:dummy).protector_subject.should == 'default_user' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
protector-inherited_resources-0.0.1 | spec/controllers/dummies_spec.rb |