diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-26 16:15:23 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-26 16:15:23 +0200 |
commit | 1dbf95ed30e66eec2247d38ed7f79b13f8bc0a1d (patch) | |
tree | 0a112d62e2e47be74d8efeb2c3ead50b17131077 /site/spec/models/user_spec.rb | |
parent | Council members can approve summaries (diff) | |
download | council-webapp-1dbf95ed30e66eec2247d38ed7f79b13f8bc0a1d.tar.gz council-webapp-1dbf95ed30e66eec2247d38ed7f79b13f8bc0a1d.tar.bz2 council-webapp-1dbf95ed30e66eec2247d38ed7f79b13f8bc0a1d.zip |
Improve tests
use :all_roles and :registered to make users in factory
Diffstat (limited to 'site/spec/models/user_spec.rb')
-rw-r--r-- | site/spec/models/user_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/site/spec/models/user_spec.rb b/site/spec/models/user_spec.rb index ad36761..c9f36b9 100644 --- a/site/spec/models/user_spec.rb +++ b/site/spec/models/user_spec.rb @@ -90,7 +90,7 @@ describe User do end it 'should allow no one to create' do - for u in users_factory(AllRoles) + for u in users_factory(:all_roles) User.new.should_not be_creatable_by(u) end end @@ -106,8 +106,8 @@ describe User do end it 'should allow everybody to view' do - for u1 in users_factory(AllRoles) - for u2 in users_factory(AllRoles - [:guest]) + for u1 in users_factory(:all_roles) + for u2 in users_factory(:registered) u2.should be_viewable_by(u1) end end |