Sha256: 2cf4e4978fa2897332f423da48037ef7ae3030bf992cfcca02fe80181b344b6d
Contents?: true
Size: 587 Bytes
Versions: 5
Compression:
Stored size: 587 Bytes
Contents
require_relative '../../spec_helper' describe Authorization do describe 'authorized_for?' do it 'should return true if the permission exists and its value is true' do Authorization.stub(:permissions){ {action: true} } Authorization.authorized_for?(:action).should == true end it 'should return false if the permission does not exists or its value is false' do Authorization.stub(:permissions){ {action: false} } Authorization.authorized_for?(:action).should == false Authorization.authorized_for?(:action2).should == false end end end
Version data entries
5 entries across 5 versions & 1 rubygems