Skip to content

Commit

Permalink
fixup! formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
noaccOS committed May 1, 2024
1 parent 19da24e commit 4590c69
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/azurex/blob/shared_access_signature_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ defmodule Azurex.Blob.SharedAccessSignatureTest do

test "defaults to parameters from overrides" do
url_with_env = sas_url(container(), blob(), from: now())

connection_params = Keyword.put(delete_env(), :container, container())
url_with_overrides = sas_url(connection_params, blob(), from: now())

assert url_with_env == url_with_overrides
assert url_with_env == url_with_overrides
end

test "wihout overrides, operates on default container" do
env =
env =
Application.get_env(:azurex, Azurex.Blob.Config)
|> Keyword.put(:default_container, container())

# Reapply environment but with default container
Application.put_env(:azurex, Azurex.Blob.Config, env)

assert sas_url([], "/", from: now()) == sas_url(container(), "/", from: now())
assert sas_url([], "/", from: now()) == sas_url(container(), "/", from: now())
end

defp container, do: "my_container"
defp blob, do: "/folder/blob.mp4"
defp now, do: ~U[2022-10-10 10:10:00Z]

defp delete_env do
env = Application.get_env(:azurex, Azurex.Blob.Config)
container = env[:default_container]
Expand Down

0 comments on commit 4590c69

Please sign in to comment.