aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/test.yml6
-rw-r--r--db/migrate/109_change_sent_at_to_datetime.rb12
-rw-r--r--spec/models/incoming_message_spec.rb2
3 files changed, 19 insertions, 1 deletions
diff --git a/config/test.yml b/config/test.yml
index c13b9c9db..e9e0aebfd 100644
--- a/config/test.yml
+++ b/config/test.yml
@@ -115,4 +115,8 @@ GAZE_URL: http://gaze.mysociety.org
# take two arguments: the URL, and a path to an output file. A static
# binary of wkhtmltopdf is recommended:
# http://code.google.com/p/wkhtmltopdf/downloads/list
-HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64 \ No newline at end of file
+HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64
+
+# Exception notifications
+EXCEPTION_NOTIFICATIONS_FROM: do-not-reply-to-this-address@example.com
+EXCEPTION_NOTIFICATIONS_TO:
diff --git a/db/migrate/109_change_sent_at_to_datetime.rb b/db/migrate/109_change_sent_at_to_datetime.rb
new file mode 100644
index 000000000..5fc9b29ae
--- /dev/null
+++ b/db/migrate/109_change_sent_at_to_datetime.rb
@@ -0,0 +1,12 @@
+class ChangeSentAtToDatetime < ActiveRecord::Migration
+ def self.up
+ remove_column :incoming_messages, :sent_at
+ add_column :incoming_messages, :sent_at, :timestamp
+ ActiveRecord::Base.connection.execute("update incoming_messages set last_parsed = null")
+ end
+
+ def self.down
+ remove_column :incoming_messages, :sent_at
+ add_column :incoming_messages, :sent_at, :time
+ end
+end
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb
index f514d6546..7808ef24c 100644
--- a/spec/models/incoming_message_spec.rb
+++ b/spec/models/incoming_message_spec.rb
@@ -14,6 +14,8 @@ describe IncomingMessage, " when dealing with incoming mail" do
end
it "should return the mail Date header date for sent at" do
+ @im.parse_raw_email!(true)
+ @im.reload
@im.sent_at.should == @im.mail.date
end