diff --git a/README.md b/README.md index cf90766..6227797 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ The [API Test Client](https://developer.okta.com/docs/api/getting_started/api_te ## Contributing -1. Fork it ( ) +1. Fork it ( ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) diff --git a/lib/oktakit.rb b/lib/oktakit.rb index 24f2865..2575f1d 100644 --- a/lib/oktakit.rb +++ b/lib/oktakit.rb @@ -2,7 +2,7 @@ require 'oktakit/client' module Oktakit - def self.new(*args) - Client.new(*args) + def self.new(**args) + Client.new(**args) end end diff --git a/spec/oktakit_spec.rb b/spec/oktakit_spec.rb index 273f06f..333c7a2 100644 --- a/spec/oktakit_spec.rb +++ b/spec/oktakit_spec.rb @@ -5,6 +5,13 @@ expect(Oktakit::VERSION).not_to(be(nil)) end + describe '.new' do + it 'creates a client with the passed in keyword arguments' do + client = Oktakit.new(token: test_okta_token, organization: 'okta-test') + expect(client.api_endpoint).to(eq('https://okta-test.okta.com/api/v1')) + end + end + describe 'client' do it 'has a default API endpoint' do client = Oktakit::Client.new(token: test_okta_token, organization: 'okta-test')