@@ -30,9 +30,6 @@ class NonNanpOobPropertyTest < Minitest::Test
reset_stanzas!
reset_redis!
- stub_request(:post, BW_MESSAGES_URL).to_return(
- status: 201, body: JSON.dump(id: "bw-msg-fallback")
- )
bw_req = stub_request(:post, BW_MESSAGES_URL).with(
body: hash_including(
text: /#{Regexp.escape(oob_url)}/
@@ -59,15 +56,12 @@ class NonNanpOobPropertyTest < Minitest::Test
reset_stanzas!
reset_redis!
- stub_request(:post, BW_MESSAGES_URL).to_return(
- status: 201, body: JSON.dump(id: "bw-msg-fallback")
- )
bw_req = stub_request(:post, BW_MESSAGES_URL).with(
body: hash_including(media: oob_url)
).to_return(
status: 201, body: JSON.dump(id: "bw-msg-nanp")
)
- stub_request(:head, oob_url).to_return(
+ media_req = stub_request(:head, oob_url).to_return(
status: 200,
headers: {
"Content-Length" => "500",
@@ -79,6 +73,7 @@ class NonNanpOobPropertyTest < Minitest::Test
assert_requested :head, oob_url
assert_requested bw_req
+ assert_requested media_req
}
end
em :test_nanp_oob_attempts_mms