Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #653 fix: remove unnecessary string casting #654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HCRitter
Copy link

@HCRitter HCRitter commented Feb 5, 2025

fix: remove unnecessary string casting and improve tenant value checks in admin consent policy test

Previously, the test for "policies/adminConsentRequestPolicy" incorrectly cast the RequestDurationInDays value to a string, resulting in faulty comparisons. This change removes the string cast, allowing for proper numeric comparison, and improves the handling of unset tenant values using [string]::IsNullOrEmpty() and a check for a zero value.

  • Removed casting of RequestDurationInDays to string.
  • Compared tenantValue directly against the integer 30.
  • Updated tenantValueNotSet logic to reliably detect unset or default values.
  • Ensured the testResultMarkdown messages remain consistent with the new logic.

fix: remove unnecessary string casting and improve tenant value checks in admin consent policy test

Previously, the test for "policies/adminConsentRequestPolicy" incorrectly cast the RequestDurationInDays value to a string, resulting in faulty comparisons. This change removes the string cast, allowing for proper numeric comparison, and improves the handling of unset tenant values using [string]::IsNullOrEmpty() and a check for a zero value.

- Removed casting of RequestDurationInDays to string.
- Compared tenantValue directly against the integer 30.
- Updated tenantValueNotSet logic to reliably detect unset or default values.
- Ensured the testResultMarkdown messages remain consistent with the new logic.
@HCRitter HCRitter requested a review from a team as a code owner February 5, 2025 13:22
Copy link
Contributor

@SamErde SamErde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants