Fix tests. Remove tests which test rails functionality
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
Dan Milne
2025-12-30 00:18:19 +11:00
parent 2a32d75895
commit 0761c424c1
10 changed files with 986 additions and 167 deletions

View File

@@ -92,9 +92,10 @@ class OidcAccessTokenTest < ActiveSupport::TestCase
@access_token.revoke!
@access_token.reload
assert @access_token.expired?, "Token should be expired after revocation"
assert @access_token.expires_at <= Time.current, "Expiry should be set to current time or earlier"
assert @access_token.expires_at < original_expiry, "Expiry should be changed from original"
assert @access_token.revoked?, "Token should be revoked after revocation"
assert @access_token.revoked_at <= Time.current, "Revoked at should be set to current time or earlier"
# expires_at should not be changed by revocation
assert_equal original_expiry, @access_token.expires_at, "Expiry should remain unchanged"
end
test "valid scope should return only non-expired tokens" do
@@ -142,7 +143,7 @@ class OidcAccessTokenTest < ActiveSupport::TestCase
@access_token.revoke!
assert original_active, "Token should be active before revocation"
assert @access_token.expired?, "Token should be expired after revocation"
assert @access_token.revoked?, "Token should be revoked after revocation"
end
test "should generate secure random tokens" do