keymail 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,15 +3,16 @@ require 'test_helper'
|
|
3
3
|
module Keymail
|
4
4
|
describe AuthMailer do
|
5
5
|
|
6
|
+
let(:token) { Factory :token }
|
7
|
+
let(:email) { ActionMailer::Base.deliveries.last }
|
8
|
+
let(:body) { email.body.raw_source }
|
9
|
+
|
6
10
|
before do
|
7
11
|
# Reset the list of sent email
|
8
12
|
ActionMailer::Base.deliveries.clear
|
9
13
|
AuthMailer.log_in(token).deliver
|
10
14
|
end
|
11
15
|
|
12
|
-
let(:token) { Factory :token }
|
13
|
-
let(:email) { ActionMailer::Base.deliveries.last }
|
14
|
-
let(:body) { email.body.raw_source }
|
15
16
|
|
16
17
|
it 'sends the email' do
|
17
18
|
ActionMailer::Base.deliveries.wont_be :empty?
|
@@ -29,7 +30,11 @@ module Keymail
|
|
29
30
|
it 'has the expiration date' do
|
30
31
|
body.must_have_content "valid until #{token.expires_at}"
|
31
32
|
end
|
32
|
-
|
33
|
+
|
34
|
+
it 'sends from the configured from_email' do
|
35
|
+
# set in config/initializers/keymail_setup.rb
|
36
|
+
email.from.must_equal ['rails.keymail@gmail.com'] # FIXME: set this here
|
37
|
+
end
|
33
38
|
|
34
39
|
end
|
35
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keymail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alcesleo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- test/dummy/config/initializers/mime_types.rb
|
73
73
|
- test/dummy/config/initializers/secret_token.rb
|
74
74
|
- test/dummy/config/initializers/session_store.rb
|
75
|
+
- test/dummy/config/initializers/setup_keymail.rb
|
75
76
|
- test/dummy/config/initializers/wrap_parameters.rb
|
76
77
|
- test/dummy/config/locales/en.yml
|
77
78
|
- test/dummy/config/routes.rb
|
@@ -147,6 +148,7 @@ test_files:
|
|
147
148
|
- test/dummy/config/initializers/mime_types.rb
|
148
149
|
- test/dummy/config/initializers/secret_token.rb
|
149
150
|
- test/dummy/config/initializers/session_store.rb
|
151
|
+
- test/dummy/config/initializers/setup_keymail.rb
|
150
152
|
- test/dummy/config/initializers/wrap_parameters.rb
|
151
153
|
- test/dummy/config/locales/en.yml
|
152
154
|
- test/dummy/config/routes.rb
|