Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Get rid of a useless import, fix some API use

  • Loading branch information...
commit 685f556ebbdaa021571c5a1fd76eb111be365e60 1 parent 5d09f2f
@Vagabond authored
Showing with 3 additions and 6 deletions.
  1. +2 −3 src/gen_smtp_server_session.erl
  2. +1 −3 src/mimemail.erl
View
5 src/gen_smtp_server_session.erl
@@ -30,7 +30,6 @@
-behaviour(gen_server).
-ifdef(TEST).
--import(smtp_util, [compute_cram_digest/2]).
-include_lib("eunit/include/eunit.hrl").
-endif.
@@ -1715,7 +1714,7 @@ smtp_session_auth_test_() ->
["334", Seed64] = string:tokens(smtp_util:trim_crlf(Packet4), " "),
Seed = base64:decode_to_string(Seed64),
- Digest = compute_cram_digest("PaSSw0rd", Seed),
+ Digest = smtp_util:compute_cram_digest("PaSSw0rd", Seed),
String = binary_to_list(base64:encode(list_to_binary(["username ", Digest]))),
socket:send(CSock, String++"\r\n"),
receive {tcp, CSock, Packet5} -> socket:active_once(CSock) end,
@@ -1758,7 +1757,7 @@ smtp_session_auth_test_() ->
["334", Seed64] = string:tokens(smtp_util:trim_crlf(Packet4), " "),
Seed = base64:decode_to_string(Seed64),
- Digest = compute_cram_digest("Passw0rd", Seed),
+ Digest = smtp_util:compute_cram_digest("Passw0rd", Seed),
String = binary_to_list(base64:encode(list_to_binary(["username ", Digest]))),
socket:send(CSock, String++"\r\n"),
receive {tcp, CSock, Packet5} -> socket:active_once(CSock) end,
View
4 src/mimemail.erl
@@ -1151,9 +1151,7 @@ parse_example_mails_test_() ->
{"no \\r\\n before first boundary",
fun() ->
{ok, Bin} = file:read_file("../testdata/html.eml"),
- {Headers, B} = parse_headers(Bin),
- Body = binstr:strip(binstr:strip(B, left, $\r), left, $\n),
- Decoded = decode(Headers, Body),
+ Decoded = decode(Bin),
?assertEqual(2, length(element(5, Decoded)))
end
},
Please sign in to comment.
Something went wrong with that request. Please try again.