Skip to content

Commit

Permalink
Get rid of a useless import, fix some API use
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagabond committed Mar 24, 2011
1 parent 5d09f2f commit 685f556
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/gen_smtp_server_session.erl
Expand Up @@ -30,7 +30,6 @@
-behaviour(gen_server).

-ifdef(TEST).
-import(smtp_util, [compute_cram_digest/2]).
-include_lib("eunit/include/eunit.hrl").
-endif.

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions src/mimemail.erl
Expand Up @@ -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
},
Expand Down

0 comments on commit 685f556

Please sign in to comment.