Skip to content

Commit

Permalink
Add spec for default model visibilities.
Browse files Browse the repository at this point in the history
  • Loading branch information
lowjoel committed Mar 29, 2016
1 parent f4a3bc2 commit 2bbf669
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/cancancan/squeel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
let(:ability) { double.extend(CanCan::Ability) }

with_database(:sqlite) do
it 'defaults to not allowing anything' do
_parent = Parent.create!
expect(Parent.accessible_by(ability)).to be_empty
end

it 'respects scope on included associations' do
ability.can :read, [Parent, Child]

Expand Down

0 comments on commit 2bbf669

Please sign in to comment.