Ability to give a statement

This commit is contained in:
2017-04-13 17:16:03 +02:00
parent b30bd91f3d
commit dd5e22ea48
66 changed files with 812 additions and 25 deletions
+9
View File
@@ -0,0 +1,9 @@
require 'rails_helper'
describe Publicity do
it { is_expected.to be_embedded_in(:supporter) }
it { is_expected.to validate_presence_of(:state) }
it { is_expected.to validate_presence_of(:statement) }
it { is_expected.to validate_presence_of(:avatar) }
end
+2
View File
@@ -12,6 +12,8 @@ describe Supporter do
it { is_expected.to validate_presence_of(:age_category) }
it { is_expected.to validate_presence_of(:language) }
it { is_expected.to embed_one(:publicity) }
describe '.counter' do
it 'counts only from a certain number on' do
allow(Supporter).to receive(:count) { 12 }