Skip to content

Commit 188244e

Browse files
committed
fix2
1 parent 9e01614 commit 188244e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/lib/code_corps/helpers/cloudinary_url_test.exs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ defmodule CodeCorps.Helpers.CloudinaryUrlTest do
22
use ExUnit.Case, async: true
33

44
test "calls Cloudex.Url.for with correct arguments" do
5-
url = CodeCorps.Helpers.CloudinaryUrl.for(:test_public_id, %{test_option: nil}, nil, nil, nil)
6-
assert url == {:test_public_id, %{test_option: nil}}
5+
expected_args = {:test_public_id, %{test_option: nil}}
6+
args = CodeCorps.Helpers.CloudinaryUrl.for(:test_public_id, %{test_option: nil}, nil, nil, nil)
7+
assert expected_args == args
78
end
89

910
test "returns correct url if called without public_id" do
10-
url = "#{Application.get_env(:code_corps, :asset_host)}/icons/type1_default_version1_color1.png"
11-
assert CodeCorps.Helpers.CloudinaryUrl.for(nil, %{}, "version1", "color1", "type1") == url
11+
expected_url = "#{Application.get_env(:code_corps, :asset_host)}/icons/type1_default_version1_color1.png"
12+
url = CodeCorps.Helpers.CloudinaryUrl.for(nil, %{}, "version1", "color1", "type1")
13+
assert expected_url == url
1214
end
1315
end

0 commit comments

Comments
 (0)