Permalink
Browse files

failing tests for admin boolean.

  • Loading branch information...
1 parent 15901a6 commit e328e9ae1320fde07c12628235db7d5d883bfb63 @sabman committed Mar 4, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 spec/models/user_spec.rb
@@ -12,8 +12,15 @@
it { should respond_to(:password) }
it { should respond_to(:password_confirmation) }
it { should respond_to(:remember_token) }
+ it { should respond_to(:admin) }
it { should respond_to(:authenticate) }
it { should be_valid }
+ it { should_not be_admin }
+
+ describe "with admin admin attribute set to true" do
+ before { @user.toggle!(:admin) }
+ it { should be_admin }
+ end
describe "when name is not present" do
before { @user.name = " " }

0 comments on commit e328e9a

Please sign in to comment.