From 7c3c8ccde2c81d959682a1d88ea31bcf05d1cbcf Mon Sep 17 00:00:00 2001 From: cthos Date: Fri, 1 Oct 2021 11:13:26 -0700 Subject: [PATCH] Docs and test to reflect API weirdness. --- auth0/resource_auth0_client_test.go | 24 ++++++++++++++++++++++++ docs/resources/client.md | 2 ++ 2 files changed, 26 insertions(+) diff --git a/auth0/resource_auth0_client_test.go b/auth0/resource_auth0_client_test.go index a2677f4f..2b5d1799 100644 --- a/auth0/resource_auth0_client_test.go +++ b/auth0/resource_auth0_client_test.go @@ -393,6 +393,13 @@ func TestAccClientMobile(t *testing.T) { resource.TestCheckResourceAttr("auth0_client.my_client", "native_social_login.0.facebook.0.enabled", "true"), ), }, + { + // This just makes sure that you can change the type (where native_social_login cannot be set) + Config: random.Template(testAccClientConfigMobileUpdateNonMobile, rand), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_client.my_client", "app_type", "non_interactive"), + ), + }, }, }) } @@ -449,6 +456,23 @@ resource "auth0_client" "my_client" { } ` +const testAccClientConfigMobileUpdateNonMobile = ` + +resource "auth0_client" "my_client" { + name = "Acceptance Test - Mobile - {{.random}}" + app_type = "non_interactive" + + native_social_login { + apple { + enabled = false + } + facebook { + enabled = false + } + } +} +` + func TestAccClientMobileValidationError(t *testing.T) { rand := random.String(6) diff --git a/docs/resources/client.md b/docs/resources/client.md index d15b5091..ca6f99b0 100644 --- a/docs/resources/client.md +++ b/docs/resources/client.md @@ -225,6 +225,8 @@ Arguments accepted by this resource include: ### Native Social Login +> Note: once this is set it must stay set, with both resources set to "false" in order to change the app_type + `native_social_login` supports the following arguments: * `apple` (Optional) Resource: