aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 7dcd3ab8a..2245a024f 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -369,3 +369,21 @@ describe User, "when calculating if a user has exceeded the request limit" do
end
+
+describe User do
+
+ describe :banned? do
+
+ it 'is banned if the user has ban_text' do
+ user = FactoryGirl.build(:user, :ban_text => 'banned')
+ expect(user).to be_banned
+ end
+
+ it 'is not banned if the user has no ban_text' do
+ user = FactoryGirl.build(:user, :ban_text => '')
+ expect(user).to_not be_banned
+ end
+
+ end
+
+end