Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation for authentication in mock adapter #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Lets say you have a test config file in `your_project/config/test.exs` and tests
config :shopify, [
shop_name: "test",
api_key: "test-key",
password: "test-paswword",
password: "test-password",
client_secret: "test-secret",
client_adapter: Shopify.Adapters.Mock, # Use included Mock adapter
fixtures_path: Path.expand("../test/fixtures/shopify", __DIR__) # Use fixures in this directory
Expand Down
2 changes: 1 addition & 1 deletion lib/shopify/adapters/mock.ex
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ defmodule Shopify.Adapters.Mock do

def basic_auth(request) do
case URI.parse(request.full_url) do
%URI{userinfo: "test:test"} -> {:passed, request}
%URI{userinfo: "test-key:test-password"} -> {:passed, request}
%URI{userinfo: _} -> {:failed, request}
end
end
Expand Down