Use the vote action to vote featured proposals
The action and the views were almost identical, with the supports progress and the HTML classes of the success message element being the only exceptions; we can use CSS for the styles instead.
This commit is contained in:
@@ -69,7 +69,6 @@ describe Abilities::Common do
|
||||
it { should be_able_to(:index, Proposal) }
|
||||
it { should be_able_to(:show, proposal) }
|
||||
it { should_not be_able_to(:vote, Proposal) }
|
||||
it { should_not be_able_to(:vote_featured, Proposal) }
|
||||
|
||||
it { should_not be_able_to(:comment_as_administrator, debate) }
|
||||
it { should_not be_able_to(:comment_as_moderator, debate) }
|
||||
@@ -212,7 +211,6 @@ describe Abilities::Common do
|
||||
|
||||
describe "Proposal" do
|
||||
it { should be_able_to(:vote, Proposal) }
|
||||
it { should be_able_to(:vote_featured, Proposal) }
|
||||
end
|
||||
|
||||
describe "Direct Message" do
|
||||
@@ -292,7 +290,6 @@ describe Abilities::Common do
|
||||
before { user.update(verified_at: Time.current) }
|
||||
|
||||
it { should be_able_to(:vote, Proposal) }
|
||||
it { should be_able_to(:vote_featured, Proposal) }
|
||||
|
||||
it { should be_able_to(:new, DirectMessage) }
|
||||
it { should be_able_to(:create, DirectMessage) }
|
||||
|
||||
Reference in New Issue
Block a user