block_head 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45f0a511282d58cced9c6c8f7351b5abd1a81556
|
4
|
+
data.tar.gz: d27365e1e752e3c92f02a93f11ac01db71c79ca8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ea1f82114e3b7a5bf27e9c3874989b78cf7b41b66e9d96501be9d3b4deeffaa3d4d5dcf5ce2bcd2ba01eb6625907bb6ebcbec19c5f2c748c8eac4617b87418c
|
7
|
+
data.tar.gz: 125c92d324cddcbc6234d9b5144a4e6080adb9ab6bf3a00663339dd5dbc0fad6f066ad1ded3ba73c0e05db55db2036c4d6170aa8b9ffeecc99ff04243971b6e8
|
data/lib/block_head/version.rb
CHANGED
@@ -11,12 +11,13 @@ describe DomainInterceptor do
|
|
11
11
|
let(:message) { double(:message) }
|
12
12
|
|
13
13
|
before do
|
14
|
-
allow(message).to receive(:to) { [
|
14
|
+
allow(message).to receive(:to) { [destination_address_1, destination_address_2] }
|
15
15
|
allow(message).to receive(:to=)
|
16
16
|
end
|
17
17
|
|
18
|
-
context "when the given email matches
|
19
|
-
let(:
|
18
|
+
context "when the given email matches all of the domains given" do
|
19
|
+
let(:destination_address_1) { "noah@hotmail.com" }
|
20
|
+
let(:destination_address_2) { "joe@hotmail.com" }
|
20
21
|
|
21
22
|
it "does not manipulate the destination of the given email" do
|
22
23
|
interceptor.delivering_email(message)
|
@@ -24,8 +25,9 @@ describe DomainInterceptor do
|
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
27
|
-
context "when the given email does not match
|
28
|
-
let(:
|
28
|
+
context "when the given email does not match one of the domains given" do
|
29
|
+
let(:destination_address_1) { "noah@gmail.com" }
|
30
|
+
let(:destination_address_2) { "noah@hotmail.com" }
|
29
31
|
|
30
32
|
it "changes the destination of the given email to the default recipient" do
|
31
33
|
interceptor.delivering_email(message)
|