aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-05-11 16:38:36 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-05-20 17:05:05 +0200
commitc6ab87f6b1ad319eb44b603096b552b83c1c2754 (patch)
tree1f2d0dc26c32d36741de9cbffe7b94efc669d221 /site/spec/models/user_spec.rb
parentUse hobo_devise to manage users login (diff)
downloadcouncil-webapp-c6ab87f6b1ad319eb44b603096b552b83c1c2754.tar.gz
council-webapp-c6ab87f6b1ad319eb44b603096b552b83c1c2754.tar.bz2
council-webapp-c6ab87f6b1ad319eb44b603096b552b83c1c2754.zip
Add council_member role to User model
Diffstat (limited to 'site/spec/models/user_spec.rb')
-rw-r--r--site/spec/models/user_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/site/spec/models/user_spec.rb b/site/spec/models/user_spec.rb
index 05254c8..bdffa30 100644
--- a/site/spec/models/user_spec.rb
+++ b/site/spec/models/user_spec.rb
@@ -4,4 +4,14 @@ describe User do
it "should run spec test with shoulda and models from application" do
Guest.new.should_not be_administrator
end
+
+ it "should set correct roles for new user" do
+ u = User.new :name => 'Example', :email => 'example@example.com',
+ :password => 'Example', :irc_nick => 'example'
+ u.save!
+ u.should_not be_administrator
+ u.should_not be_council_member
+ u.should_not be_guest
+ u.should be_signed_up
+ end
end