Skip to content

Commit

Permalink
test: clean mock group resource in policies tests suite (#174)
Browse files Browse the repository at this point in the history
* test: clean mock group resource in policies tests suite

* test: fix authserver scope test descriptions

Co-authored-by: Shuo Wu <wushuo2010@gmail.com>
  • Loading branch information
shuowu-okta and shuowu authored Jul 7, 2020
1 parent 7f11eab commit f18ef41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/it/authserver-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const client = new okta.Client({
requestExecutor: new okta.DefaultRequestExecutor()
});

describe('Authorization Server Policies API', () => {
describe('Authorization Server Scope API', () => {
let authServer;
before(async () => {
authServer = await client.createAuthorizationServer(getMockAuthorizationServer());
Expand All @@ -25,7 +25,7 @@ describe('Authorization Server Policies API', () => {
await authServer.delete();
});

describe('List all policies', () => {
describe('List all scopes', () => {
let scope;
beforeEach(async () => {
scope = await authServer.createOAuth2Scope(mockScope);
Expand All @@ -34,7 +34,7 @@ describe('Authorization Server Policies API', () => {
await authServer.deleteOAuth2Scope(scope.id);
});

it('should return a collection of policies', async () => {
it('should return a collection of scopes', async () => {
const collection = authServer.listOAuth2Scopes();
expect(collection).to.be.instanceOf(Collection);
const scopes = [];
Expand Down
1 change: 1 addition & 0 deletions test/it/policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ describe('Policy Scenarios', () => {
const oktaSignOnPolicy = new models.OktaSignOnPolicy(policy, client);
const createdPolicy = await client.createPolicy(oktaSignOnPolicy);
await client.deletePolicy(createdPolicy.id);
await client.deleteGroup(createdGroup.id);

expect(createdPolicy).to.not.be.undefined;
expect(createdPolicy.name).to.equal(policy.name);
Expand Down

0 comments on commit f18ef41

Please sign in to comment.