Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
test "create_or_update_shop/1 creates a shop if it doesn't already exist" do
assert {:ok, %Shop{} = shop} = ShopifyApp.create_or_update_shop(@valid_attrs)
assert shop.shopify_domain == @valid_attrs.shopify_domain
assert shop.shopify_token == @valid_attrs.shopify_token
end
test "create_or_update_shop/1 updates a shop's token if it already exists" do
shop_fixture()
params = %{
shopify_domain: @valid_attrs.shopify_domain,
shopify_token: @valid_attrs.shopify_token <> " - update"
}
assert {:ok, %Shop{} = shop} = ShopifyApp.create_or_update_shop(params)
assert shop.shopify_domain == @valid_attrs.shopify_domain
assert shop.shopify_token == @valid_attrs.shopify_token <> " - update"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.