diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-06-08 18:20:05 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-06-10 18:21:04 +0200 |
commit | cdabbcd4c068bf4591998b33a769187683eef17f (patch) | |
tree | 368426c4fb38096331d35626943d93a576f11fc6 /site/spec/models/participation_spec.rb | |
parent | Receive list of meeting participants from IRC bot (diff) | |
download | council-webapp-cdabbcd4c068bf4591998b33a769187683eef17f.tar.gz council-webapp-cdabbcd4c068bf4591998b33a769187683eef17f.tar.bz2 council-webapp-cdabbcd4c068bf4591998b33a769187683eef17f.zip |
Handle proxies attendance
Mark council member who appointed proxy as present, not proxy.
Diffstat (limited to 'site/spec/models/participation_spec.rb')
-rw-r--r-- | site/spec/models/participation_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/site/spec/models/participation_spec.rb b/site/spec/models/participation_spec.rb index 242abde..395dc03 100644 --- a/site/spec/models/participation_spec.rb +++ b/site/spec/models/participation_spec.rb @@ -25,15 +25,21 @@ describe Participation do a = Factory(:agenda) Factory(:agenda, :state => 'old') + Factory(:proxy, :proxy => u.first, + :council_member => non_participants.last, + :agenda => a) + results_hash = { 'Whatever' => { u[0].irc_nick => 'Yes', u[1].irc_nick => 'Yes', u[2].irc_nick => 'Yes'}, 'Something else' => { u[0].irc_nick => 'Yes', u[1].irc_nick => 'No'} } + present = u - [u.first] + [non_participants.last] Participation.mark_participations(results_hash) - (Participation.all.*.irc_nick - u.*.irc_nick).should be_empty - (u.*.irc_nick - Participation.all.*.irc_nick).should be_empty - (u - Participation.all.*.participant).should be_empty + (Participation.all.*.irc_nick - present.*.irc_nick).should be_empty + (present.*.irc_nick - Participation.all.*.irc_nick).should be_empty + (present - Participation.all.*.participant).should be_empty + (Participation.all.*.participant - present).should be_empty end end end |