Class: ActionMailboxAmazonIngress::RSpec::Email
- Inherits:
-
Object
- Object
- ActionMailboxAmazonIngress::RSpec::Email
- Defined in:
- lib/action_mailbox_amazon_ingress/rspec/email.rb
Instance Method Summary collapse
- #authentic? ⇒ Boolean
- #default_mail ⇒ Object
- #headers ⇒ Object
-
#initialize(authentic: true, topic: 'topic:arn:default', mail: default_mail, message_params: {}) ⇒ Email
constructor
A new instance of Email.
- #message_json ⇒ Object
- #params ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(authentic: true, topic: 'topic:arn:default', mail: default_mail, message_params: {}) ⇒ Email
Returns a new instance of Email.
6 7 8 9 10 11 |
# File 'lib/action_mailbox_amazon_ingress/rspec/email.rb', line 6 def initialize(authentic: true, topic: 'topic:arn:default', mail: default_mail, message_params: {}) @authentic = authentic @topic = topic @mail = mail @message_params = end |
Instance Method Details
#authentic? ⇒ Boolean
36 37 38 |
# File 'lib/action_mailbox_amazon_ingress/rspec/email.rb', line 36 def authentic? @authentic end |
#default_mail ⇒ Object
40 41 42 |
# File 'lib/action_mailbox_amazon_ingress/rspec/email.rb', line 40 def default_mail Mail.new end |
#headers ⇒ Object
13 14 15 |
# File 'lib/action_mailbox_amazon_ingress/rspec/email.rb', line 13 def headers { 'content-type' => 'application/json' } end |
#message_json ⇒ Object
29 30 31 32 33 34 |
# File 'lib/action_mailbox_amazon_ingress/rspec/email.rb', line 29 def { 'notificationType' => 'Received', 'content' => @mail.encoded }.merge(@message_params).to_json end |
#params ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/action_mailbox_amazon_ingress/rspec/email.rb', line 21 def params { 'Type' => 'Notification', 'TopicArn' => @topic, 'Message' => } end |
#url ⇒ Object
17 18 19 |
# File 'lib/action_mailbox_amazon_ingress/rspec/email.rb', line 17 def url '/rails/action_mailbox/amazon/inbound_emails' end |