adds booth backend for index, show, create and edit actions
This commit is contained in:
@@ -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
|
||||
|
||||
16
spec/models/poll/booth_spec.rb
Normal file
16
spec/models/poll/booth_spec.rb
Normal 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
|
||||
Reference in New Issue
Block a user