Last active
July 11, 2018 07:49
-
-
Save Ninigi/3054bd705f11f9a010938a37c0ef31a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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