aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/user_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index bb1b054aa..b6f48dad3 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -360,4 +360,11 @@ describe User, "when calculating if a user has exceeded the request limit" do
@user.exceeded_limit?.should be_true
end
+ it 'should return false if the user is allowed to make batch requests' do
+ @user.can_make_batch_requests = true
+ AlaveteliConfiguration.stub!(:max_requests_per_user_per_day).and_return(0)
+ @user.exceeded_limit?.should be_false
+ end
+
+
end