adds booth backend for index, show, create and edit actions

This commit is contained in:
rgarcia
2016-09-28 11:56:19 +02:00
parent 7db3683c27
commit 2c3127b6bd
18 changed files with 288 additions and 85 deletions

View File

@@ -56,4 +56,7 @@ describe "Abilities::Administrator" do
it { should be_able_to(:update, SpendingProposal) }
it { should be_able_to(:valuate, SpendingProposal) }
it { should be_able_to(:destroy, SpendingProposal) }
it { should be_able_to(:manage, Poll) }
it { should be_able_to(:manage, Poll::Booth) }
end

View File

@@ -0,0 +1,16 @@
require 'rails_helper'
describe :booth do
let(:booth) { build(:poll_booth) }
it "should be valid" do
expect(booth).to be_valid
end
it "should not be valid without a name" do
booth.name = nil
expect(booth).to_not be_valid
end
end