Skip to content

Commit

Permalink
Add certificate renewal intent (#326)
Browse files Browse the repository at this point in the history
* Add certificate renewal intent

* alphabetical
  • Loading branch information
alisherry authored Aug 19, 2024
1 parent f817ca3 commit c77987a
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/workos/types/intent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ module Types
# intents while generating an Admin Portal link.
module Intent
AUDIT_LOGS = 'audit_logs'
CERTIFICATE_RENEWAL = 'certificate_renewal'
DSYNC = 'dsync'
LOG_STREAMS = 'log_streams'
SSO = 'sso'

ALL = [AUDIT_LOGS, DSYNC, LOG_STREAMS, SSO].freeze
ALL = [AUDIT_LOGS, CERTIFICATE_RENEWAL, DSYNC, LOG_STREAMS, SSO].freeze
end
end
end
15 changes: 15 additions & 0 deletions spec/lib/workos/portal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@
end
end
end

describe 'with the certificate_renewal intent' do
it 'returns an Admin Portal link' do
VCR.use_cassette 'portal/generate_link_certificate_renewal', match_requests_on: %i[path body] do
portal_link = described_class.generate_link(
intent: 'certificate_renewal',
organization: organization,
)

expect(portal_link).to eq(
'https://id.workos.com/portal/launch?secret=secret',
)
end
end
end
end

describe 'with an invalid organization' do
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c77987a

Please sign in to comment.