Skip to content

Commit

Permalink
Add audit_logs Admin Portal intent
Browse files Browse the repository at this point in the history
  • Loading branch information
robframpton committed Sep 15, 2022
1 parent fb9ce70 commit bcc0b24
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/workos/types/intent_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Intent < T::Enum
enums do
SSO = new('sso')
DSYNC = new('dsync')
AUDIT_LOGS = new('audit_logs')
end
end
end
Expand Down
15 changes: 15 additions & 0 deletions spec/lib/workos/portal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@
end
end
end

describe 'with the audit_logs intent' do
it 'returns an Admin Portal link' do
VCR.use_cassette 'portal/generate_link_dsync' do
portal_link = described_class.generate_link(
intent: 'audit_logs',
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

0 comments on commit bcc0b24

Please sign in to comment.