Skip to content

Commit

Permalink
add unit test for no error on 404 while deleting tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
phenry-db authored and nfx committed Aug 31, 2021
1 parent 42193d8 commit 0054ca3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions identity/resource_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,23 @@ func TestResourceTokenDelete(t *testing.T) {
assert.Equal(t, "abc", d.Id())
}

func TestResourceTokenDelete_NotFoundNoError(t *testing.T) {
_, err := qa.ResourceFixture{
Fixtures: []qa.HTTPFixture{
{
Method: "POST",
Resource: "/api/2.0/token/delete",
Response: common.NotFound("RESOURCE_DOES_NOT_EXIST"), // per documentation this is the error response
Status: 404,
},
},
Resource: ResourceToken(),
Delete: true,
ID: "abc",
}.Apply(t)
assert.NoError(t, err, err)
}

func TestResourceTokenDelete_Error(t *testing.T) {
d, err := qa.ResourceFixture{
Fixtures: []qa.HTTPFixture{
Expand Down

0 comments on commit 0054ca3

Please sign in to comment.