fixes conflicts with master

This commit is contained in:
rgarcia
2016-07-19 14:49:27 +02:00
167 changed files with 6212 additions and 967 deletions

View File

@@ -53,6 +53,10 @@ describe "Abilities::Common" do
it { should_not be_able_to(:comment_as_administrator, proposal) }
it { should_not be_able_to(:comment_as_moderator, proposal) }
it { should be_able_to(:new, DirectMessage) }
it { should_not be_able_to(:create, DirectMessage) }
it { should_not be_able_to(:show, DirectMessage) }
describe 'flagging content' do
it { should be_able_to(:flag, debate) }
it { should be_able_to(:unflag, debate) }
@@ -101,6 +105,7 @@ describe "Abilities::Common" do
describe "when level 2 verified" do
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
let(:own_direct_message) { create(:direct_message, sender: user) }
before{ user.update(residence_verified_at: Time.now, confirmed_phone: "1") }
it { should be_able_to(:vote, Proposal) }
@@ -122,10 +127,15 @@ describe "Abilities::Common" do
it { should_not be_able_to(:create, ballot_in_selecting_budget) }
it { should be_able_to(:create, ballot_in_balloting_budget) }
it { should be_able_to(:new, DirectMessage) }
it { should be_able_to(:create, DirectMessage) }
it { should be_able_to(:show, own_direct_message) }
it { should_not be_able_to(:show, create(:direct_message)) }
end
describe "when level 3 verified" do
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
let(:own_direct_message) { create(:direct_message, sender: user) }
before{ user.update(verified_at: Time.now) }
it { should be_able_to(:vote, Proposal) }
@@ -134,5 +144,10 @@ describe "Abilities::Common" do
it { should be_able_to(:create, SpendingProposal) }
it { should_not be_able_to(:destroy, create(:spending_proposal)) }
it { should_not be_able_to(:destroy, own_spending_proposal) }
it { should be_able_to(:new, DirectMessage) }
it { should be_able_to(:create, DirectMessage) }
it { should be_able_to(:show, own_direct_message) }
it { should_not be_able_to(:show, create(:direct_message)) }
end
end