-
-
Save kbaum/750c98ab32ea216d01b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimpledbMessage < SimpleRecord::Base | |
has_ints :message_id, :user_id, :email_account_id, :uid, :merchant_id, :email_event_id | |
has_booleans :order, :shipping, :account_service, :downloaded | |
has_attributes :from_address, :to_address, :subject, :from_display_name, :to_display_name, :pop_id, :s3_filename | |
has_dates :date | |
end | |
SimpleRecord.establish_connection(AWS_ACCESS_KEY,AWS_SECRET_ACCESS_KEY, :connection_mode=>:single) | |
SimpleRecord::Base.set_domain_prefix("#{Rails.env}_") | |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe SimpledbMessage do | |
before(:each) do | |
h = {"merchant_id"=>nil, "message_id"=>84, "to_display_name"=>"Natalia Wallace", | |
"body_plain"=>nil, "pop_id"=>"489498EF-8DCB-4225-B87F-629E75A72538", | |
"date"=>Time.now, "order"=>false, "type"=>nil, "email_account_id"=>7686, | |
"email_file_path"=>"03328704-5967-43e1-9900-87f6ce22eb44.ser", | |
"subject"=>"Last Call to accept Katherine Smiths Drop Out challenge", "uid"=>nil, | |
"account_service"=>false, "downloaded"=>nil, "email_event_id"=>310028, | |
"from_display_name"=>"Katherine Smith", "shipping"=>false, "order_total"=>nil, | |
"user_id"=>37549, "from_address"=>"hello@orangeshops.com", | |
"to_address"=>"karlandrew08@hotmail.com", "s3_filename"=>"other/2009-11-10/04/84.eml"} | |
@long_message = SimpledbMessage.new(h) | |
end | |
it "should save" do | |
@long_message.save | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment