Skip to content

Commit

Permalink
tests: fix legacy test
Browse files Browse the repository at this point in the history
  • Loading branch information
Juiced66 committed Oct 30, 2024
1 parent c9cb2b8 commit f17c37f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions features/step_definitions/auth-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,20 @@ Given(
should(token).not.be.undefined();

this.sdk.jwt = token;

const { valid } = await this.sdk.auth.checkToken();

this.sdk.jwt = previousToken;

if (not) {
should(valid).be.false("Provided token is valid");
should(await this.sdk.auth.checkToken()).throwError({
id: "services.storage.not_found",
});
} else {
const { valid } = await this.sdk.auth.checkToken();
this.sdk.jwt = previousToken;
should(valid).be.true("Provided token is invalid");
}
},
);

Given("I save the created API key", function () {
this.props.token = this.props.result._source.token;
this.props.token = this.props.result.token;
});

Given(
Expand Down

0 comments on commit f17c37f

Please sign in to comment.