diff options
-rw-r--r-- | spec/models/request_mailer_spec.rb | 12 | ||||
-rw-r--r-- | todo.txt | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/spec/models/request_mailer_spec.rb b/spec/models/request_mailer_spec.rb index cccd91a35..03d4c464b 100644 --- a/spec/models/request_mailer_spec.rb +++ b/spec/models/request_mailer_spec.rb @@ -20,10 +20,22 @@ describe RequestMailer, " when receiving incoming mail" do ir.incoming_messages.size.should == 1 deliveries = ActionMailer::Base.deliveries + #raise deliveries[1].body deliveries.size.should == 1 mail = deliveries[0] mail.to.should == [ MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost') ] end + + it "should not mutilate long URLs when trying to word wrap them" do + long_url = 'http://www.this.is.quite.a.long.url.flourish.org/there.is.no.way.it.is.short.whatsoever' + body = "This is a message with quite a long URL in it. It also has a paragraph, being this one that has quite a lot of text in it to. Enough to test the wrapping of itself. + +#{long_url} + +And a paragraph afterwards." + wrapped = MySociety::Format.wrap_email_body(body) + wrapped.should include(long_url) + end end @@ -44,6 +44,7 @@ https://secure.mysociety.org/admin/foi/request/show/37 https://secure.mysociety.org/admin/foi/request/show/137 GUI for uploading changed CSV files +Interface for deleting requests Things to track: - new requests @@ -66,8 +67,6 @@ everywhere that it should "Some of the information" option should give you choice of complaining if you like. -Wrapping long URLs in emails breaks the h off http off the beginning nastily - Use :order in the info_request.events belongs_to clause instead of each time it is queried Also sort user.info_requests for user pages Also see in request_controller.rb: @info_request_events.sort! { |a,b| a.created_at <=> b.created_at } |