fixes abilities: level 3 users can vote proposals, not just level 2
This commit is contained in:
@@ -42,7 +42,7 @@ class Ability
|
||||
can :vote, Comment
|
||||
end
|
||||
|
||||
if user.level_two_verified?
|
||||
if user.level_two_or_three_verified?
|
||||
can :vote, Proposal
|
||||
end
|
||||
|
||||
|
||||
@@ -106,6 +106,12 @@ describe Ability do
|
||||
|
||||
it { should be_able_to(:vote, Proposal) }
|
||||
end
|
||||
|
||||
describe "when level 3 verified" do
|
||||
before{ user.update(verified_at: Time.now) }
|
||||
|
||||
it { should be_able_to(:vote, Proposal) }
|
||||
end
|
||||
end
|
||||
|
||||
describe "Organization" do
|
||||
|
||||
Reference in New Issue
Block a user