aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-08-07 01:15:20 +0100
committerFrancis Irving <francis@mysociety.org>2010-08-07 01:15:20 +0100
commit2af2d1f3892801e5f04126b23fd41da591a24817 (patch)
treefdd7b9f46832998e2c5a35806ca9aaf0b0c60e0f /spec/lib
parent52eda4eff8f978a3c89c41e6d3e91a1b25623e89 (diff)
Test code for mixed case detection. Update to new code for that from commonlib.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/mysociety_validate_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/lib/mysociety_validate_spec.rb b/spec/lib/mysociety_validate_spec.rb
index 4ac912361..1d59677be 100644
--- a/spec/lib/mysociety_validate_spec.rb
+++ b/spec/lib/mysociety_validate_spec.rb
@@ -22,5 +22,26 @@ describe "when checking text uses mixed capitals" do
MySociety::Validate.uses_mixed_capitals("This is a normal sentence. It is followed by another, and overall it is quite a long chunk of text so it exceeds the minimum limit.").should == true
end
+ it "should allow lots of URLs, when the rest of casing is fine" do
+ MySociety::Validate.uses_mixed_capitals("
+The public authority appears to have aggregated this request with the following requests on this site:
+
+http://www.whatdotheyknow.com/request/financial_value_of_post_dismissa_2
+
+http://www.whatdotheyknow.com/request/number_of_post_dismissal_compens_2
+
+http://www.whatdotheyknow.com/request/number_of_post_dismissal_compens_3
+
+...and has given one response to all four of these requests, available here:
+
+http://www.whatdotheyknow.com/request/financial_value_of_post_dismissa_2#incoming-105717
+
+The information requested in this request was not provided, however the information requested in the following request was provided:
+
+http://www.whatdotheyknow.com/request/number_of_post_dismissal_compens_3
+ ").should == true
+ end
+
+
end