Skip to content

Commit

Permalink
Merge branch 'peterfoot-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
timheuer committed Oct 13, 2021
2 parents 759dace + b64be21 commit 1104037
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions Alexa.NET.Tests/CardTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public void Creates_Valid_AskForPermissionConsent()
{
var actual = new AskForPermissionsConsentCard();
actual.Permissions.Add(RequestedPermission.ReadHouseholdList);
actual.Permissions.Add(RequestedPermission.WriteHouseholdList);

Assert.True(Utility.CompareJson(actual, "AskForPermissionsConsent.json"));
}
Expand Down
3 changes: 2 additions & 1 deletion Alexa.NET.Tests/Examples/AskForPermissionsConsent.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"type": "AskForPermissionsConsent",
"permissions": [
"read::alexa:household:list"
"alexa::household:lists:read",
"alexa::household:lists:write"
]
}
6 changes: 4 additions & 2 deletions Alexa.NET.Tests/ResponseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@ public void DeserializesExampleAskForPermissionsConsentJson()
var card = (AskForPermissionsConsentCard)deserialized;

Assert.Equal("AskForPermissionsConsent", card.Type);
Assert.Equal(1, card.Permissions.Count);
Assert.Equal("read::alexa:household:list", card.Permissions.First());
Assert.Equal(2, card.Permissions.Count);
Assert.NotEqual("read::alexa:household:list", card.Permissions.First());
Assert.Equal("alexa::household:lists:read", card.Permissions.First());
Assert.Equal("alexa::household:lists:write", card.Permissions.Last());
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions Alexa.NET/Response/RequestedPermission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ namespace Alexa.NET.Response
{
public static class RequestedPermission
{
public const string ReadHouseholdList = "read::alexa:household:list";
public const string WriteHouseholdList = "write::alexa:household:list";
public const string ReadHouseholdList = "alexa::household:lists:read";
public const string WriteHouseholdList = "alexa::household:lists:write";
public const string FullAddress = "read::alexa:device:all:address";
public const string AddressCountryAndPostalCode = "read::alexa:device:all:address:country_and_postal_code";
}
Expand Down

0 comments on commit 1104037

Please sign in to comment.